Tom Lane writes:
 > and here's a typical use:
 > 
 > extern int pg_snprintf(char *str, size_t count, const char *fmt,...)
 > /* This extension allows gcc to check the format string */
 > __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
 > 


Hi Tom,

thanks for your explanation. I've checked the sources, and
interestingly src/dbi_main.c contains a declaration of dbi_conn_queryf():

dbi_result dbi_conn_queryf(dbi_conn Conn, const char *formatstr, ...) 
__attribute__ ((format (printf, 2, 3)));

in addition to the declaration in include/dbi/dbi.h:

dbi_result dbi_conn_queryf(dbi_conn Conn, const char *formatstr, ...);

Was that a half-assed attempt to implement what the OP asked for?
Would it be sufficient to move the first declaration to the header
which is visible to the programs that actually call the function?

regards,
Markus


-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
libdbi-devel mailing list
libdbi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to