Skip to content

Commit 396bccf

Browse files
committed
More php3_ cleanup
1 parent 878ed49 commit 396bccf

File tree

12 files changed

+148
-190
lines changed

12 files changed

+148
-190
lines changed

ext/interbase/interbase.c

+90-90
Large diffs are not rendered by default.

ext/interbase/php_interbase.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include <ibase.h>
4343

4444
extern zend_module_entry ibase_module_entry;
45-
#define php3_ibase_module_ptr &ibase_module_entry
45+
#define php_ibase_module_ptr &ibase_module_entry
4646

4747
extern PHP_MINIT_FUNCTION(ibase);
4848
extern PHP_RINIT_FUNCTION(ibase);
@@ -72,34 +72,34 @@ typedef struct {
7272
char *timeformat;
7373
} ibase_module;
7474

75-
typedef struct _php3_ibase_result {
75+
typedef struct _php_ibase_result {
7676
isc_stmt_handle result;
7777
isc_tr_handle trans;
7878
XSQLDA *sqlda;
7979
int commitok;
8080
} ibase_result_handle;
8181

82-
typedef struct _php3_ibase_query {
82+
typedef struct _php_ibase_query {
8383
isc_stmt_handle query;
8484
isc_tr_handle trans;
8585
XSQLDA *sqlda;
8686
int alloced;
8787
} ibase_query_handle;
8888

89-
typedef struct _php3_ibase_varchar {
89+
typedef struct _php_ibase_varchar {
9090
short var_len;
9191
char var_str[1];
9292
} IBASE_VCHAR;
9393

94-
extern ibase_module php3_ibase_module;
94+
extern ibase_module php_ibase_module;
9595

9696
#else
9797

98-
#define php3_ibase_module_ptr NULL
98+
#define php_ibase_module_ptr NULL
9999

100100
#endif /* HAVE_IBASE */
101101

102-
#define phpext_interbase_ptr php3_ibase_module_ptr
102+
#define phpext_interbase_ptr php_ibase_module_ptr
103103

104104
#endif /* _PHP3_IBASE_H */
105105

ext/oci8/oci8.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ PHP_RINIT_FUNCTION(oci)
405405

406406
OCI(debug_mode) = 0; /* start "fresh" */
407407

408-
oci_debug("php3_rinit_oci8");
408+
oci_debug("php_rinit_oci8");
409409

410410
return SUCCESS;
411411
}
@@ -428,7 +428,7 @@ PHP_MSHUTDOWN_FUNCTION(oci)
428428
{
429429
OCILS_FETCH();
430430

431-
oci_debug("php3_mshutdown_oci8");
431+
oci_debug("php_mshutdown_oci8");
432432

433433
zend_hash_apply(OCI(user),(int (*)(void *))_user_pcleanup);
434434
zend_hash_apply(OCI(server),(int (*)(void *))_server_pcleanup);
@@ -483,7 +483,7 @@ PHP_RSHUTDOWN_FUNCTION(oci)
483483
{
484484
OCILS_FETCH();
485485

486-
oci_debug("php3_rshutdown_oci8");
486+
oci_debug("php_rshutdown_oci8");
487487

488488
zend_hash_apply(OCI(user),(int (*)(void *))_user_cleanup);
489489
zend_hash_apply(OCI(server),(int (*)(void *))_server_cleanup);

ext/odbc/php_odbc.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ void ODBC_SQL_ERROR(HENV henv, HDBC conn, HSTMT stmt, char *func)
477477
} while ( SQL_SUCCEEDED( ret ));
478478
}
479479

480-
void php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
480+
void php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
481481
{
482482
odbc_result *result;
483483
pval **pv_res, **pv_flag;
@@ -608,15 +608,15 @@ PHP_FUNCTION(odbc_close_all)
608608
Handle binary column data */
609609
PHP_FUNCTION(odbc_binmode)
610610
{
611-
php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
611+
php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
612612
}
613613
/* }}} */
614614

615615
/* {{{ proto int odbc_longreadlen(int result_id, int length)
616616
Handle LONG columns */
617617
PHP_FUNCTION(odbc_longreadlen)
618618
{
619-
php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
619+
php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
620620
}
621621
/* }}} */
622622

@@ -650,7 +650,7 @@ PHP_FUNCTION(odbc_prepare)
650650
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
651651
if (rc == SQL_INVALID_HANDLE) {
652652
efree(result);
653-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_prepare");
653+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_prepare");
654654
RETURN_FALSE;
655655
}
656656

@@ -889,7 +889,7 @@ PHP_FUNCTION(odbc_cursor)
889889
result->stmt, state, &error, errormsg,
890890
sizeof(errormsg)-1, &errormsgsize);
891891
if (!strncmp(state,"S1015",5)) {
892-
sprintf(cursorname,"php3_curs_%d", (int)result->stmt);
892+
sprintf(cursorname,"php_curs_%d", (int)result->stmt);
893893
if (SQLSetCursorName(result->stmt,cursorname,SQL_NTS) != SQL_SUCCESS) {
894894
ODBC_SQL_ERROR(result->conn_ptr->henv, result->conn_ptr->hdbc,
895895
result->stmt, "SQLSetCursorName");
@@ -2202,7 +2202,7 @@ PHP_FUNCTION(odbc_tables)
22022202
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
22032203
if (rc == SQL_INVALID_HANDLE) {
22042204
efree(result);
2205-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_tables");
2205+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_tables");
22062206
RETURN_FALSE;
22072207
}
22082208

@@ -2284,7 +2284,7 @@ PHP_FUNCTION(odbc_columns)
22842284
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
22852285
if (rc == SQL_INVALID_HANDLE) {
22862286
efree(result);
2287-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_columns");
2287+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_columns");
22882288
RETURN_FALSE;
22892289
}
22902290

@@ -2363,7 +2363,7 @@ PHP_FUNCTION(odbc_columnprivileges)
23632363
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
23642364
if (rc == SQL_INVALID_HANDLE) {
23652365
efree(result);
2366-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_columnprivileges");
2366+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_columnprivileges");
23672367
RETURN_FALSE;
23682368
}
23692369

@@ -2461,7 +2461,7 @@ PHP_FUNCTION(odbc_foreignkeys)
24612461
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
24622462
if (rc == SQL_INVALID_HANDLE) {
24632463
efree(result);
2464-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_foreignkeys");
2464+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_foreignkeys");
24652465
RETURN_FALSE;
24662466
}
24672467

@@ -2540,7 +2540,7 @@ PHP_FUNCTION(odbc_gettypeinfo)
25402540
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
25412541
if (rc == SQL_INVALID_HANDLE) {
25422542
efree(result);
2543-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_gettypeinfo");
2543+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_gettypeinfo");
25442544
RETURN_FALSE;
25452545
}
25462546

@@ -2612,7 +2612,7 @@ PHP_FUNCTION(odbc_primarykeys)
26122612
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
26132613
if (rc == SQL_INVALID_HANDLE) {
26142614
efree(result);
2615-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_primarykeys");
2615+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_primarykeys");
26162616
RETURN_FALSE;
26172617
}
26182618

@@ -2694,7 +2694,7 @@ PHP_FUNCTION(odbc_procedurecolumns)
26942694
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
26952695
if (rc == SQL_INVALID_HANDLE) {
26962696
efree(result);
2697-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_procedurecolumns");
2697+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_procedurecolumns");
26982698
RETURN_FALSE;
26992699
}
27002700

@@ -2776,7 +2776,7 @@ PHP_FUNCTION(odbc_procedures)
27762776
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
27772777
if (rc == SQL_INVALID_HANDLE) {
27782778
efree(result);
2779-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_procedures");
2779+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_procedures");
27802780
RETURN_FALSE;
27812781
}
27822782

@@ -2862,7 +2862,7 @@ PHP_FUNCTION(odbc_specialcolumns)
28622862
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
28632863
if (rc == SQL_INVALID_HANDLE) {
28642864
efree(result);
2865-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_specialcolumns");
2865+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_specialcolumns");
28662866
RETURN_FALSE;
28672867
}
28682868

@@ -2947,7 +2947,7 @@ PHP_FUNCTION(odbc_statistics)
29472947
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
29482948
if (rc == SQL_INVALID_HANDLE) {
29492949
efree(result);
2950-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_statistics");
2950+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_statistics");
29512951
RETURN_FALSE;
29522952
}
29532953

@@ -3025,7 +3025,7 @@ PHP_FUNCTION(odbc_tableprivileges)
30253025
rc = SQLAllocStmt(conn->hdbc, &(result->stmt));
30263026
if (rc == SQL_INVALID_HANDLE) {
30273027
efree(result);
3028-
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in php3_odbc_tableprivileges");
3028+
php_error(E_WARNING, "SQLAllocStmt error 'Invalid Handle' in odbc_tableprivileges");
30293029
RETURN_FALSE;
30303030
}
30313031

ext/odbc/php_velocis.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ PHP_FUNCTION(velocis_rollback);
9292
PHP_FUNCTION(velocis_fieldnum);
9393
PHP_FUNCTION(velocis_fieldname);
9494

95-
extern velocis_module php3_velocis_module;
95+
extern velocis_module php_velocis_module;
9696

9797
#else
9898

ext/odbc/velocis.c

+14-14
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ zend_module_entry velocis_module_entry = {
6969
zend_module_entry *get_module() { return &velocis_module_entry; }
7070
#endif
7171

72-
THREAD_LS velocis_module php3_velocis_module;
72+
THREAD_LS velocis_module php_velocis_module;
7373
THREAD_LS static HENV henv;
7474

7575
static void _close_velocis_link(VConn *conn)
@@ -97,12 +97,12 @@ static void _free_velocis_result(Vresult *res)
9797
PHP_MINIT_FUNCTION(velocis)
9898
{
9999
SQLAllocEnv(&henv);
100-
if ( cfg_get_long("velocis.max_links",&php3_velocis_module.max_links) == FAILURE ) {
101-
php3_velocis_module.max_links = -1;
100+
if ( cfg_get_long("velocis.max_links",&php_velocis_module.max_links) == FAILURE ) {
101+
php_velocis_module.max_links = -1;
102102
}
103-
php3_velocis_module.num_links = 0;
104-
php3_velocis_module.le_link = register_list_destructors(_close_velocis_link,NULL);
105-
php3_velocis_module.le_result = register_list_destructors(_free_velocis_result,NULL);
103+
php_velocis_module.num_links = 0;
104+
php_velocis_module.le_link = register_list_destructors(_close_velocis_link,NULL);
105+
php_velocis_module.le_result = register_list_destructors(_free_velocis_result,NULL);
106106

107107
return SUCCESS;
108108
}
@@ -131,7 +131,7 @@ velocis_add_conn(HashTable *list,VConn *conn,HDBC hdbc)
131131
{
132132
int ind;
133133

134-
ind = zend_list_insert(conn,php3_velocis_module.le_link);
134+
ind = zend_list_insert(conn,php_velocis_module.le_link);
135135
conn->hdbc = hdbc;
136136
conn->index = ind;
137137

@@ -145,7 +145,7 @@ velocis_find_conn(HashTable *list,int ind)
145145
int type;
146146

147147
conn = zend_list_find(ind,&type);
148-
if ( !conn || type != php3_velocis_module.le_link ) {
148+
if ( !conn || type != php_velocis_module.le_link ) {
149149
return(NULL);
150150
}
151151
return(conn);
@@ -162,7 +162,7 @@ velocis_add_result(HashTable *list,Vresult *res,VConn *conn)
162162
{
163163
int ind;
164164

165-
ind = zend_list_insert(res,php3_velocis_module.le_result);
165+
ind = zend_list_insert(res,php_velocis_module.le_result);
166166
res->conn = conn;
167167
res->index = ind;
168168

@@ -176,7 +176,7 @@ velocis_find_result(HashTable *list,int ind)
176176
int type;
177177

178178
res = zend_list_find(ind,&type);
179-
if ( !res || type != php3_velocis_module.le_result ) {
179+
if ( !res || type != php_velocis_module.le_result ) {
180180
return(NULL);
181181
}
182182
return(res);
@@ -201,8 +201,8 @@ PHP_FUNCTION(velocis_connect)
201201
VConn *new;
202202
long ind;
203203

204-
if ( php3_velocis_module.max_links != -1 && php3_velocis_module.num_links == php3_velocis_module.max_links ) {
205-
php_error(E_WARNING,"Velocis: Too many open connections (%d)",php3_velocis_module.num_links);
204+
if ( php_velocis_module.max_links != -1 && php_velocis_module.num_links == php_velocis_module.max_links ) {
205+
php_error(E_WARNING,"Velocis: Too many open connections (%d)",php_velocis_module.num_links);
206206
RETURN_FALSE;
207207
}
208208
if ( ARG_COUNT(ht) != 3 ||
@@ -233,7 +233,7 @@ PHP_FUNCTION(velocis_connect)
233233
RETURN_FALSE;
234234
}
235235
ind = velocis_add_conn(list,new,hdbc);
236-
php3_velocis_module.num_links++;
236+
php_velocis_module.num_links++;
237237
RETURN_LONG(ind);
238238
}
239239

@@ -254,7 +254,7 @@ PHP_FUNCTION(velocis_close)
254254
SQLDisconnect(conn->hdbc);
255255
SQLFreeConnect(conn->hdbc);
256256
velocis_del_conn(list,id->value.lval);
257-
php3_velocis_module.num_links--;
257+
php_velocis_module.num_links--;
258258
RETURN_TRUE;
259259
}
260260

ext/standard/dl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void php_dl(pval *file,int type,pval *return_value)
113113
error_type = E_CORE_ERROR;
114114
}
115115
#if MSVC5
116-
php_error(error_type,"Unable to load dynamic library '%s'<br>\n%s",libpath,php3_win_err());
116+
php_error(error_type,"Unable to load dynamic library '%s'<br>\n%s",libpath,php_win_err());
117117
#else
118118
php_error(error_type,"Unable to load dynamic library '%s' - %s",libpath,dlerror());
119119
#endif

ext/zlib/php_zlib.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ typedef struct {
3939
int gzgetss_state;
4040
} php_zlib_globals;
4141

42-
extern zend_module_entry php3_zlib_module_entry;
43-
#define zlib_module_ptr &php3_zlib_module_entry
42+
extern zend_module_entry php_zlib_module_entry;
43+
#define zlib_module_ptr &php_zlib_module_entry
4444

4545
extern PHP_MINIT_FUNCTION(zlib);
4646
extern PHP_MSHUTDOWN_FUNCTION(zlib);

0 commit comments

Comments
 (0)