Skip to content

Commit

Permalink
Moving function mapscript_create_legend
Browse files Browse the repository at this point in the history
Fixing error "undefined symbol: mapscript_create_legend" in PHP7
  • Loading branch information
bjoernboldt authored and AlexanderGabriel committed Oct 22, 2018
1 parent 461f827 commit 8990708
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions mapscript/php/legend.c
Expand Up @@ -220,6 +220,17 @@ zend_function_entry legend_functions[] = {
}
};

void mapscript_create_legend(legendObj *legend, parent_object parent, zval *return_value TSRMLS_DC)
{
php_legend_object * php_legend;
object_init_ex(return_value, mapscript_ce_legend);
php_legend = MAPSCRIPT_OBJ_P(php_legend_object, return_value);
php_legend->legend = legend;

php_legend->parent = parent;
MAPSCRIPT_ADDREF(parent.val);
}


#if PHP_VERSION_ID >= 70000
/* PHP7 - Modification by Bjoern Boldt <mapscript@pixaweb.net> */
Expand Down Expand Up @@ -276,17 +287,6 @@ PHP_MINIT_FUNCTION(legend)
}
#else
/* PHP5 */
void mapscript_create_legend(legendObj *legend, parent_object parent, zval *return_value TSRMLS_DC)
{
php_legend_object * php_legend;
object_init_ex(return_value, mapscript_ce_legend);
php_legend = MAPSCRIPT_OBJ_P(php_legend_object, return_value);
php_legend->legend = legend;

php_legend->parent = parent;
MAPSCRIPT_ADDREF(parent.val);
}

static void mapscript_legend_object_destroy(void *object TSRMLS_DC)
{
php_legend_object *php_legend = (php_legend_object *)object;
Expand Down

0 comments on commit 8990708

Please sign in to comment.