mirror of
https://github.com/postgres/postgres.git
synced 2026-02-11 14:53:31 -05:00
This moves the code around from one huge file into hopefully logical and more manageable modules. For the most part, the code itself was not touched, except: PLy_function_handler and PLy_trigger_handler were renamed to PLy_exec_function and PLy_exec_trigger, because they were not actually handlers in the PL handler sense, and it makes the naming more similar to the way PL/pgSQL is organized. The initialization of the procedure caches was separated into a new function init_procedure_caches to keep the hash tables private to plpy_procedures.c. Jan Urbański and Peter Eisentraut
21 lines
491 B
C
21 lines
491 B
C
/*--------------------------
|
|
* common utility functions
|
|
*--------------------------
|
|
*/
|
|
|
|
#ifndef PLPY_UTIL_H
|
|
#define PLPY_UTIL_H
|
|
|
|
extern void *PLy_malloc(size_t);
|
|
extern void *PLy_malloc0(size_t);
|
|
extern char *PLy_strdup(const char *);
|
|
extern void PLy_free(void *);
|
|
|
|
extern PyObject *PLyUnicode_Bytes(PyObject *unicode);
|
|
extern char *PLyUnicode_AsString(PyObject *unicode);
|
|
|
|
#if PY_MAJOR_VERSION >= 3
|
|
extern PyObject *PLyUnicode_FromString(const char *s);
|
|
#endif
|
|
|
|
#endif /* PLPY_UTIL_H */
|