Advertisement
Guest User

Untitled

a guest
Aug 18th, 2012
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. #ifndef WIN32_LEAN_AND_MEAN
  2. #define WIN32_LEAN_AND_MEAN
  3. #endif
  4.  
  5. #define NOCOMM
  6. #define NOapi
  7.  
  8. #ifdef _WIN32
  9. #define DLLEXPORT __declspec(dllexport)
  10. #else
  11. #define DLLEXPORT
  12. #endif
  13.  
  14. //#include <windows.h>
  15. #include "postgres.h"
  16. #include "fmgr.h"
  17.  
  18. #include <string.h>
  19.  
  20. #ifdef PG_MODULE_MAGIC
  21. PG_MODULE_MAGIC;
  22. #endif
  23.  
  24. /* by value */        
  25. int add_one(int arg)
  26. {
  27.     return arg + 1;
  28. }
  29.  
  30. /* by reference, fixed length */
  31. float8 * add_one_float8(float8 *arg)
  32. {
  33.     float8    *result = (float8 *) palloc(sizeof(float8));
  34.  
  35.     *result = *arg + 1.0;
  36.        
  37.     return result;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement