From 2a2896efccc5178411b596a3a8623d1021f0772b Mon Sep 17 00:00:00 2001 From: Boris Batkin Date: Tue, 11 Nov 2025 16:08:45 -0800 Subject: [PATCH] compile builting module takes const data --- include/daScript/ast/ast.h | 2 +- src/ast/ast_module.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/daScript/ast/ast.h b/include/daScript/ast/ast.h index 529969629b..fe6c1e016d 100644 --- a/include/daScript/ast/ast.h +++ b/include/daScript/ast/ast.h @@ -1151,7 +1151,7 @@ namespace das if ( objModule->visibleEverywhere ) return true; return requireModule.find(objModule) != requireModule.end(); } - bool compileBuiltinModule ( const string & name, unsigned char * str, unsigned int str_len );//will replace last symbol to 0 + bool compileBuiltinModule ( const string & name, const unsigned char * const str, unsigned int str_len );//will replace last symbol to 0 static Module * require ( const string & name ); static Module * requireEx ( const string & name, bool allowPromoted ); static void Initialize(); diff --git a/src/ast/ast_module.cpp b/src/ast/ast_module.cpp index 1d78ea311e..a1a2de5e01 100644 --- a/src/ast/ast_module.cpp +++ b/src/ast/ast_module.cpp @@ -571,7 +571,7 @@ namespace das { return it != callThis.end() ? &it->second : nullptr; } - bool Module::compileBuiltinModule ( const string & modName, unsigned char * str, unsigned int str_len ) { + bool Module::compileBuiltinModule ( const string & modName, const unsigned char * const str, unsigned int str_len ) { TextWriter issues; auto access = make_smart(); auto fileInfo = make_unique((char *) str, uint32_t(str_len), false);