Header And Logo

PostgreSQL
| The world's most advanced open source database.

plpy_util.h

Go to the documentation of this file.
00001 /*--------------------------
00002  * common utility functions
00003  *--------------------------
00004  */
00005 
00006 #ifndef PLPY_UTIL_H
00007 #define PLPY_UTIL_H
00008 
00009 extern void *PLy_malloc(size_t bytes);
00010 extern void *PLy_malloc0(size_t bytes);
00011 extern char *PLy_strdup(const char *str);
00012 extern void PLy_free(void *ptr);
00013 
00014 extern PyObject *PLyUnicode_Bytes(PyObject *unicode);
00015 extern char *PLyUnicode_AsString(PyObject *unicode);
00016 
00017 #if PY_MAJOR_VERSION >= 3
00018 extern PyObject *PLyUnicode_FromString(const char *s);
00019 #endif
00020 
00021 #endif   /* PLPY_UTIL_H */