Changeset: b0828adbc241 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0828adbc241
Modified Files:
        sql/backends/monet5/config_rss/test_rss.c
        sql/backends/monet5/config_rss/test_rss.mal
        sql/test/configurable_rss/Tests/rss.py
Branch: config_rss
Log Message:

Let exported mal function return int instead of void.


diffs (38 lines):

diff --git a/sql/backends/monet5/config_rss/test_rss.c 
b/sql/backends/monet5/config_rss/test_rss.c
--- a/sql/backends/monet5/config_rss/test_rss.c
+++ b/sql/backends/monet5/config_rss/test_rss.c
@@ -17,8 +17,11 @@
 
 #define TEST_FILE "test_file"
 
-mal_export str TESTrestricted_rss(lng* GDK_mem_maxsize /*in bytes*/)
+mal_export str TESTrestricted_rss(int* RetVal, lng* GDK_mem_maxsize /*in 
bytes*/)
 {
+       *RetVal = 0; // Use a dummy return value to make interfacing with 
sql/mal easy.
+
+
        // We are going to try to allocate twice the maximum configured rss 
bound.
        size_t rss_bound = (size_t) *GDK_mem_maxsize, to_be_allocated = 2 * 
rss_bound, allocated = 0;
 
diff --git a/sql/backends/monet5/config_rss/test_rss.mal 
b/sql/backends/monet5/config_rss/test_rss.mal
--- a/sql/backends/monet5/config_rss/test_rss.mal
+++ b/sql/backends/monet5/config_rss/test_rss.mal
@@ -1,5 +1,5 @@
 module test_config_rss;
 
-command run_test_config_rss(GDK_mem_maxsize:lng):void 
+command run_test_config_rss(GDK_mem_maxsize:lng):int 
 address TESTrestricted_rss
 comment "C code will allocate memory and test whether the configured rss limit 
is violated.";
diff --git a/sql/test/configurable_rss/Tests/rss.py 
b/sql/test/configurable_rss/Tests/rss.py
--- a/sql/test/configurable_rss/Tests/rss.py
+++ b/sql/test/configurable_rss/Tests/rss.py
@@ -9,7 +9,7 @@ class RSSTestConfig:
     sql_template = \
 """
 create function test_rss(bound bigint)
-returns bigint external name test_config_rss.run_test_config_rss;
+returns int external name test_config_rss.run_test_config_rss;
 
 select test_rss({gdk_mem_maxsize});
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to