From af91b2b41cb92134dc0103aab05683485c1f0c94 Mon Sep 17 00:00:00 2001 From: hg <4683435+hgtw@users.noreply.github.com> Date: Sat, 12 Aug 2023 21:48:08 -0400 Subject: [PATCH] [CMake] Define perlbind option for all targets (#3538) This isn't designed well and wasn't handled correctly since the perlbind library was getting built and linked with default options while zone was using PERLBIND_NO_STRICT_SCALAR_TYPES. This was probably leading to some unspecified behavior. --- CMakeLists.txt | 1 + zone/embperl.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c00ef03d9..1edb491f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -388,6 +388,7 @@ IF(PERL_LIBRARY_ENABLED) INCLUDE_DIRECTORIES(SYSTEM "${PERL_LIBRARY_INCLUDE}") ADD_DEFINITIONS(-DEMBPERL) ADD_DEFINITIONS(-DEMBPERL_PLUGIN) + ADD_DEFINITIONS(-DPERLBIND_NO_STRICT_SCALAR_TYPES) ENDIF() ENDIF() diff --git a/zone/embperl.h b/zone/embperl.h index e9a3f780a..02047e32e 100644 --- a/zone/embperl.h +++ b/zone/embperl.h @@ -18,10 +18,6 @@ Eglin #include #include -// this option disables distinct int/float/string function argument types for -// backwards compatibility with current perl api usage -// e.g. quest::settimer(0, 1) using number for timer name instead of string -#define PERLBIND_NO_STRICT_SCALAR_TYPES #include namespace perl = perlbind;