Skip to content

Commit 04a11bf

Browse files
bjoernboldtAlexanderGabriel
authored andcommitted
Moving function void mapscript_create_grid
1 parent 8990708 commit 04a11bf

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

mapscript/php/grid.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,17 @@ zend_function_entry grid_functions[] = {
176176
}
177177
};
178178

179+
void mapscript_create_grid(graticuleObj *grid, parent_object parent, zval *return_value TSRMLS_DC)
180+
{
181+
php_grid_object * php_grid;
182+
object_init_ex(return_value, mapscript_ce_grid);
183+
php_grid = MAPSCRIPT_OBJ_P(php_grid_object, return_value);
184+
php_grid->grid = grid;
185+
186+
php_grid->parent = parent;
187+
MAPSCRIPT_ADDREF(parent.val);
188+
}
189+
179190
#if PHP_VERSION_ID >= 70000
180191
/* PHP7 - Modification by Bjoern Boldt <mapscript@pixaweb.net> */
181192
static zend_object *mapscript_grid_create_object(zend_class_entry *ce TSRMLS_DC)
@@ -225,17 +236,6 @@ PHP_MINIT_FUNCTION(grid)
225236
}
226237
#else
227238
/* PHP5 */
228-
void mapscript_create_grid(graticuleObj *grid, parent_object parent, zval *return_value TSRMLS_DC)
229-
{
230-
php_grid_object * php_grid;
231-
object_init_ex(return_value, mapscript_ce_grid);
232-
php_grid = MAPSCRIPT_OBJ_P(php_grid_object, return_value);
233-
php_grid->grid = grid;
234-
235-
php_grid->parent = parent;
236-
MAPSCRIPT_ADDREF(parent.val);
237-
}
238-
239239
static void mapscript_grid_object_destroy(void *object TSRMLS_DC)
240240
{
241241
php_grid_object *php_grid = (php_grid_object *)object;
@@ -277,4 +277,4 @@ PHP_MINIT_FUNCTION(grid)
277277

278278
return SUCCESS;
279279
}
280-
#endif
280+
#endif

0 commit comments

Comments
 (0)