diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2024-10-14 13:47:59 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2024-10-14 13:47:59 -0400 |
commit | f18231e817599246fc99a798c9bf57ab785db91f (patch) | |
tree | 73c9c524c00ee469f32b1e3703f757bf04321c4c /src/interfaces/ecpg/preproc/preproc_extern.h | |
parent | a542d5614bdb6430094556162b9ca2f01d35f9dc (diff) |
ecpg: move some functions into a new file ecpg/preproc/util.c.
mm_alloc and mm_strdup were in type.c, which seems a completely
random choice. No doubt the original author thought two small
functions didn't deserve their own file. But I'm about to add
some more memory-management stuff beside them, so let's put them
in a less surprising place. This seems like a better home for
mmerror, mmfatal, and the cat_str/make_str family, too.
Discussion: https://postgr.es/m/2011420.1713493114@sss.pgh.pa.us
Diffstat (limited to 'src/interfaces/ecpg/preproc/preproc_extern.h')
-rw-r--r-- | src/interfaces/ecpg/preproc/preproc_extern.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/preproc/preproc_extern.h b/src/interfaces/ecpg/preproc/preproc_extern.h index da939674620..29329ccd891 100644 --- a/src/interfaces/ecpg/preproc/preproc_extern.h +++ b/src/interfaces/ecpg/preproc/preproc_extern.h @@ -82,6 +82,10 @@ extern int base_yylex(void); extern void base_yyerror(const char *error); extern void *mm_alloc(size_t size); extern char *mm_strdup(const char *string); +extern char *cat2_str(char *str1, char *str2); +extern char *cat_str(int count,...); +extern char *make2_str(char *str1, char *str2); +extern char *make3_str(char *str1, char *str2, char *str3); extern void mmerror(int error_code, enum errortype type, const char *error,...) pg_attribute_printf(3, 4); extern void mmfatal(int error_code, const char *error,...) pg_attribute_printf(2, 3) pg_attribute_noreturn(); extern void output_get_descr_header(char *desc_name); |