Author: turnstep
Date: Mon Mar  3 08:50:04 2008
New Revision: 10871

Modified:
   DBD-Pg/trunk/quote.c
   DBD-Pg/trunk/types.c

Log:
Cannot use DBIS->debug in other C files.


Modified: DBD-Pg/trunk/quote.c
==============================================================================
--- DBD-Pg/trunk/quote.c        (original)
+++ DBD-Pg/trunk/quote.c        Mon Mar  3 08:50:04 2008
@@ -16,8 +16,6 @@
        dTHX;
        char *result;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%snull_quote\n", THEADER);
-
        New(0, result, len+1, char);
        strncpy(result,string,len);
        result[len]='\0';
@@ -33,8 +31,6 @@
        STRLEN oldlen = len;
        const char * const tmp = string;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%squote_string\n", THEADER);
-
        (*retlen) = 2;
        while (len > 0 && *string != '\0') {
                if (*string == '\'' || *string == '\\') {
@@ -67,8 +63,6 @@
        char * result;
         const char *tmp;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%squote_geom\n", THEADER);
-
        len = 0; /* stops compiler warnings. Remove entirely someday */
        tmp = string;
        (*retlen) = 2;
@@ -96,8 +90,6 @@
        char * result;
        const char * const tmp = string;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%squote_path\n", THEADER);
-
        len = 0; /* stops compiler warnings. Remove entirely someday */
        (*retlen) = 2;
        while (*string != '\0') {
@@ -125,8 +117,6 @@
        char * result;
        const char * const tmp = string;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%squote_circle\n", THEADER);
-
        len = 0; /* stops compiler warnings. Remove entirely someday */
        (*retlen) = 2;
        while (*string != '\0') {
@@ -155,8 +145,6 @@
        char * result;
        STRLEN oldlen = len;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%squote_bytea\n", THEADER);
-
        result = string;
        (*retlen) = 2;
        while (len > 0) {
@@ -224,8 +212,6 @@
        long int int_value;
        STRLEN  max_len=6;
        
-       if (TSTARTQ) TRC(DBILOGFP, "%squote_bool\n", THEADER);
-
        len = 0;
        if (isDIGIT(*(const char*)value)) {
                /* For now -- will go away when quote* take SVs */
@@ -258,8 +244,6 @@
         const int intval = *((const int*)value);
        len = 0;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%squote_integer\n", THEADER);
-
        New(0, result, max_len, char);
        
        if (0 == intval)
@@ -279,7 +263,6 @@
 {
        dTHX;
        /* TODO: chop_blanks if requested */
-       if (TSTARTQ) TRC(DBILOGFP, "%sdequote_char\n", THEADER);
        *retlen = strlen(string);
 }
 
@@ -287,7 +270,6 @@
 void dequote_string(const char *string, STRLEN *retlen)
 {
        dTHX;
-       if (TSTARTQ) TRC(DBILOGFP, "%sdequote_string\n", THEADER);
        *retlen = strlen(string);
 }
 
@@ -298,8 +280,6 @@
        dTHX;
        char *result;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%sdequote_bytea\n", THEADER);
-
        (*retlen) = 0;
 
        if (NULL == string)
@@ -344,8 +324,6 @@
 {
        dTHX;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%sdequote_sql_binary\n", THEADER);
-
        /* We are going to retun a dequote_bytea(), JIC */
        warn("Use of SQL_BINARY invalid in dequote()");
        dequote_bytea(string, retlen);
@@ -359,8 +337,6 @@
 {
        dTHX;
 
-       if (TSTARTQ) TRC(DBILOGFP, "%sdequote_bool\n", THEADER);
-
        switch(*string){
        case 'f': *string = '0'; break;
        case 't': *string = '1'; break;
@@ -375,7 +351,6 @@
 void null_dequote(const char *string, STRLEN *retlen)
 {
        dTHX;
-       if (TSTARTQ) TRC(DBILOGFP, "%snull_dequote\n", THEADER);
        *retlen = strlen(string);
 
 }

Modified: DBD-Pg/trunk/types.c
==============================================================================
--- DBD-Pg/trunk/types.c        (original)
+++ DBD-Pg/trunk/types.c        Mon Mar  3 08:50:04 2008
@@ -157,8 +157,6 @@
 {
        dTHX;
 
-       if (TSTART) TRC(DBILOGFP, "%sBegin pg_type_data (sql_type: %d)\n", 
THEADER, sql_type);
-
        switch(sql_type) {
 
                case PG_ABSTIMEARRAY:       return &pg_types[0];
@@ -327,8 +325,6 @@
 {
        dTHX;
 
-       if (TSTART) TRC(DBILOGFP, "%sBegin sql_type_data (sql_type: %d)\n", 
THEADER, sql_type);
-
        switch(sql_type) {
                case SQL_BOOLEAN:                      return &sql_types[0];
                case SQL_VARBINARY:                    return &sql_types[2];
@@ -654,8 +650,6 @@
 {
 \tdTHX;
 
-\tif (TSTART) TRC(DBILOGFP, \"%sBegin pg_type_data (sql_type: %d)\\n\", 
THEADER, sql_type);
-
 \tswitch(sql_type) {
 \n";
 
@@ -682,7 +676,7 @@
 print $newfh "\};\n\n";
 
 print $newfh "sql_type_info_t* sql_type_data(int sql_type)\n\{\n";
-print $newfh "\tdTHX;\n\n\tif (TSTART) TRC(DBILOGFP, \"%sBegin sql_type_data 
(sql_type: %d)\\n\", THEADER, sql_type);\n\n";
+
 print $newfh "\tswitch(sql_type) \{\n";
 for (sort { $pos{$a} <=> $pos{$b} } keys %pos) {
        printf $newfh qq{\t\tcase %-*s return \&sql_types\[%d\];\n}, 1+$maxlen, 
"$_:", $pos{$_};

Reply via email to