Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: swig/swig
...
head fork: swig/swig
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
5 Lib/php/director.swg
@@ -102,12 +102,11 @@ namespace Swig {
TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
zend_class_entry **ce;
zend_function *mptr;
- int name_len = strlen(lc_fname);
if (zend_lookup_class(cname, strlen(cname), &ce TSRMLS_CC) != SUCCESS) {
return false;
}
- if (zend_hash_find(&(*ce)->function_table, lc_fname, name_len + 1, (void **) &mptr) != SUCCESS) {
+ if (zend_hash_find(&(*ce)->function_table, lc_fname, strlen(lc_fname) + 1, (void **) &mptr) != SUCCESS) {
return false;
}
// common.scope points to the declaring class
@@ -128,7 +127,7 @@ namespace Swig {
std::string swig_msg;
public:
DirectorException(int code, const char *hdr, const char *msg TSRMLS_DC) : swig_msg(hdr) {
- if (strlen(msg)) {
+ if (msg[0]) {
swig_msg += " ";
swig_msg += msg;
}
View
20 Lib/php/globalvar.i
@@ -164,7 +164,7 @@
zend_hash_find(&EG(symbol_table), (char*)"$1", sizeof("$1"), (void**)&z_var);
convert_to_string_ex(z_var);
s1 = Z_STRVAL_PP(z_var);
- if ((s1 == NULL) || ($1 == NULL) || zend_binary_strcmp(s1, strlen(s1), $1, strlen($1))) {
+ if ((s1 == NULL) || ($1 == NULL) || strcmp(s1, $1)) {
if (s1)
$1 = estrdup(s1);
else
@@ -190,9 +190,9 @@
zend_hash_find(&EG(symbol_table), (char*)"$1", sizeof("$1"), (void**)&z_var);
s1 = Z_STRVAL_PP(z_var);
- if((s1 == NULL) || ($1 == NULL) || zend_binary_strcmp(s1, strlen(s1), $1, strlen($1))) {
- if(s1)
- strncpy($1, s1, $1_dim0);
+ if ((s1 == NULL) || ($1 == NULL) || strcmp(s1, $1)) {
+ if (s1)
+ strncpy($1, s1, $1_dim0);
}
}
@@ -216,7 +216,7 @@
$1_ltype _temp;
zend_hash_find(&EG(symbol_table), (char*)"$1", sizeof("$1"), (void**)&z_var);
- if (SWIG_ConvertPtr(*z_var, (void **)&_temp, $1_descriptor, 0) < 0) {
+ if (SWIG_ConvertPtr(*z_var, (void **)&_temp, $1_descriptor, 0) < 0) {
SWIG_PHP_Error(E_ERROR,"Type error in value of $symname. Expected $&1_descriptor");
}
@@ -288,12 +288,12 @@
zend_hash_find(&EG(symbol_table), (char*)"$1", sizeof("$1"), (void**)&z_var);
s1 = Z_STRVAL_PP(z_var);
- if((s1 == NULL) || ($1 == NULL) || zend_binary_strcmp(s1, strlen(s1), $1, strlen($1) )) {
+ if((s1 == NULL) || ($1 == NULL) || strcmp(s1, $1)) {
if(s1)
efree(s1);
if($1) {
(*z_var)->value.str.val = estrdup($1);
- (*z_var)->value.str.len = strlen($1) +1;
+ (*z_var)->value.str.len = strlen($1) + 1;
} else {
(*z_var)->value.str.val = 0;
(*z_var)->value.str.len = 0;
@@ -314,7 +314,7 @@
zval **z_var;
zend_hash_find(&EG(symbol_table), (char*)"$1", sizeof("$1"), (void**)&z_var);
- if($1)
+ if($1)
SWIG_SetPointerZval(*z_var, (void*)$1, $1_descriptor, 0);
}
@@ -325,10 +325,10 @@
deliberate error cos this code looks bogus to me
zend_hash_find(&EG(symbol_table), (char*)"$1", sizeof("$1"), (void**)&z_var);
s1 = Z_STRVAL_PP(z_var);
- if((s1 == NULL) || zend_binary_strcmp(s1, strlen(s1), $1, strlen($1))) {
+ if((s1 == NULL) || strcmp(s1, $1)) {
if($1) {
(*z_var)->value.str.val = estrdup($1);
- (*z_var)->value.str.len = strlen($1)+1;
+ (*z_var)->value.str.len = strlen($1) + 1;
} else {
(*z_var)->value.str.val = 0;
(*z_var)->value.str.len = 0;
View
2  Lib/python/director.swg
@@ -179,7 +179,7 @@ namespace Swig {
public:
DirectorException(PyObject *error, const char *hdr ="", const char *msg ="") : swig_msg(hdr) {
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
- if (strlen(msg)) {
+ if (msg[0]) {
swig_msg += " ";
swig_msg += msg;
}
View
2  Lib/ruby/director.swg
@@ -118,7 +118,7 @@ namespace Swig {
}
DirectorException(VALUE error, const char *hdr, const char *msg ="") : swig_error(error), swig_msg(hdr) {
- if (strlen(msg)) {
+ if (msg[0]) {
swig_msg += " ";
swig_msg += msg;
}

No commit comments for this range

Something went wrong with that request. Please try again.