summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_library
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
committerBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
commit9db949eec327df4173fde3de934a87bedb0db13c (patch)
treeaeffa0f0e68b1d2ceb74d460cbbd22652c9cd159 /indra/lscript/lscript_library
parent419e13d0acaabf5e1e02e9b64a07648bce822b2f (diff)
svn merge -r88066:88786 svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge
dataserver-is-deprecated for-fucks-sake-whats-with-these-commit-markers
Diffstat (limited to 'indra/lscript/lscript_library')
-rw-r--r--indra/lscript/lscript_library/CMakeLists.txt32
-rw-r--r--indra/lscript/lscript_library/lscript_library.cpp13
2 files changed, 39 insertions, 6 deletions
diff --git a/indra/lscript/lscript_library/CMakeLists.txt b/indra/lscript/lscript_library/CMakeLists.txt
new file mode 100644
index 0000000000..f6bc67a994
--- /dev/null
+++ b/indra/lscript/lscript_library/CMakeLists.txt
@@ -0,0 +1,32 @@
+# -*- cmake -*-
+
+include(00-Common)
+include(LLCommon)
+include(LLMath)
+include(LScript)
+
+set(lscript_library_SOURCE_FILES
+ lscript_alloc.cpp
+ lscript_export.cpp
+ lscript_library.cpp
+ )
+
+set(lscript_library_HEADER_FILES
+ CMakeLists.txt
+
+ ../lscript_library.h
+ ../lscript_export.h
+ )
+
+set_source_files_properties(${lscript_library_HEADER_FILES}
+ PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND lscript_library_SOURCE_FILES ${lscript_library_HEADER_FILES})
+
+include_directories(
+ ${LLCOMMON_INCLUDE_DIRS}
+ ${LLMATH_INCLUDE_DIRS}
+ ${LSCRIPT_INCLUDE_DIRS}
+ )
+
+add_library (lscript_library ${lscript_library_SOURCE_FILES})
diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp
index 3a5b6eacc0..0b357c9182 100644
--- a/indra/lscript/lscript_library/lscript_library.cpp
+++ b/indra/lscript/lscript_library/lscript_library.cpp
@@ -468,14 +468,14 @@ void LLScriptLibrary::init()
//addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetForSale", "i", "ii", "integer llSetForSale(integer selltype, integer price)\nSets this object for sale in mode selltype for price. Returns TRUE if successfully set for sale."));
-LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), char *name, char *ret_type, char *args, char *desc, BOOL god_only)
+LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, const char *desc, BOOL god_only)
: mEnergyUse(eu), mSleepTime(st), mExecFunc(exec_func), mName(name), mReturnType(ret_type), mArgs(args), mGodOnly(god_only)
{
- mDesc = new char[512];
+ char *mDesc_ = new char[512];
if (mSleepTime)
{
snprintf( /* Flawfinder: ignore */
- mDesc,
+ mDesc_,
512,
"%s\nSleeps script for %.1f seconds.",
desc,
@@ -483,9 +483,10 @@ LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_fun
}
else
{
- strncpy(mDesc, desc, 512); /* Flawfinder: ignore */
- mDesc[511] = '\0'; // just in case.
+ strncpy(mDesc_, desc, 512); /* Flawfinder: ignore */
+ mDesc_[511] = '\0'; // just in case.
}
+ mDesc = mDesc_;
}
LLScriptLibraryFunction::~LLScriptLibraryFunction()
@@ -509,7 +510,7 @@ void LLScriptLibrary::addFunction(LLScriptLibraryFunction *func)
mNextNumber++;
}
-void LLScriptLibrary::assignExec(char *name, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &))
+void LLScriptLibrary::assignExec(const char *name, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &))
{
S32 i;
for (i = 0; i < mNextNumber; i++)