Changeset: e7b64c14a6a8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e7b64c14a6a8
Removed Files:
monetdb5/mal/mal_properties.c
monetdb5/mal/mal_properties.h
Modified Files:
clients/Tests/exports.stable.out
clients/Tests/malcheck.stable.err
monetdb5/mal/mal_factory.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_listing.h
monetdb5/optimizer/opt_costModel.h
monetdb5/optimizer/opt_garbageCollector.c
monetdb5/optimizer/opt_support.h
Branch: default
Log Message:
Remove mal_properties leftovers
diffs (229 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1616,10 +1616,6 @@ str PCREquote(str *r, const str *v);
str PCREreplace_bat_wrap(bat *res, const bat *or, const str *pat, const str
*repl, const str *flags);
str PCREreplace_wrap(str *res, const str *or, const str *pat, const str *repl,
const str *flags);
str PCREsql2pcre(str *ret, const str *pat, const str *esc);
-sht PropertyIndex(str name);
-str PropertyName(sht idx);
-prop_op_t PropertyOperator(str s);
-str PropertyOperatorString(prop_op_t op);
str QLOGcall(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
void QLOGcalls(BAT **r);
void QLOGcatalog(BAT **r);
diff --git a/clients/Tests/malcheck.stable.err
b/clients/Tests/malcheck.stable.err
--- a/clients/Tests/malcheck.stable.err
+++ b/clients/Tests/malcheck.stable.err
@@ -5,6 +5,13 @@ stderr of test 'malcheck` in directory '
# 15:15:51 > "./malcheck.sh" "malcheck"
# 15:15:51 >
+Traceback (most recent call last):
+ File "<string>", line 1, in <module>
+ File
"/export/scratch1/mk/default/Linux/lib/python2.7/site-packages/MonetDBtesting/malcheck.py",
line 200, in <module>
+ process(f)
+ File
"/export/scratch1/mk/default/Linux/lib/python2.7/site-packages/MonetDBtesting/malcheck.py",
line 75, in process
+ data = open(f).read()
+IOError: [Errno 2] No such file or directory: 'monetdb5/mal/mal_properties.c'
# 15:16:26 >
# 15:16:26 > "Done."
diff --git a/monetdb5/mal/mal_factory.c b/monetdb5/mal/mal_factory.c
--- a/monetdb5/mal/mal_factory.c
+++ b/monetdb5/mal/mal_factory.c
@@ -18,6 +18,7 @@
#include "mal_exception.h"
#include "mal_session.h"
#include "mal_debugger.h"
+#include "mal_namespace.h"
#include "mal_private.h"
typedef struct {
diff --git a/monetdb5/mal/mal_instruction.h b/monetdb5/mal/mal_instruction.h
--- a/monetdb5/mal/mal_instruction.h
+++ b/monetdb5/mal/mal_instruction.h
@@ -11,7 +11,7 @@
#include "mal_type.h"
#include "mal_stack.h"
-#include "mal_properties.h"
+#include "mal_namespace.h"
#define isaSignature(P) ((P)->token >=COMMANDsymbol)
diff --git a/monetdb5/mal/mal_listing.h b/monetdb5/mal/mal_listing.h
--- a/monetdb5/mal/mal_listing.h
+++ b/monetdb5/mal/mal_listing.h
@@ -12,7 +12,6 @@
#include "mal_type.h"
#include "mal_stack.h"
#include "mal_instruction.h"
-#include "mal_properties.h"
#define DEBUG_MAL_LIST
diff --git a/monetdb5/mal/mal_properties.c b/monetdb5/mal/mal_properties.c
deleted file mode 100644
--- a/monetdb5/mal/mal_properties.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2008-2015 MonetDB B.V.
- */
-
-/*
- * (author) M. Kersten
- */
-#include "monetdb_config.h"
-#include "mal_properties.h"
-#include "mal_exception.h"
-#include "mal_type.h" /* for idcmp() */
-
-static str *properties = NULL;
-static int nr_properties = 0;
-static int max_properties = 0;
-
-sht
-PropertyIndex(str name)
-{
- int i=0;
- for (i=0; i<nr_properties; i++) {
- if (strcmp(properties[i], name) == 0)
- return i;
- }
- MT_lock_set(&mal_contextLock, "propertyIndex");
- /* small change it's already added */
- for (i=0; i<nr_properties; i++) {
- if (strcmp(properties[i], name) == 0) {
- MT_lock_unset(&mal_contextLock, "propertyIndex");
- return i;
- }
- }
- if (i >= max_properties) {
- max_properties += 256;
- properties = GDKrealloc(properties, max_properties *
sizeof(str));
- if( properties == NULL){
- GDKerror("PropertyIndex" MAL_MALLOC_FAIL);
- MT_lock_unset(&mal_contextLock, "propertyIndex");
- return nr_properties;
- }
- }
- properties[nr_properties] = GDKstrdup(name);
- MT_lock_unset(&mal_contextLock, "propertyIndex");
- return nr_properties++;
-}
-
-str
-PropertyName(sht idx)
-{
- if (idx < nr_properties)
- return properties[idx];
- return "None";
-}
-
-prop_op_t
-PropertyOperator( str s )
-{
- if (!s || !*s)
- return op_eq;
- if (*s == '<') {
- if (*(s+1) == '=')
- return op_lte;
- return op_lt;
- } else if (*s == '>') {
- if (*(s+1) == '=')
- return op_gte;
- return op_gt;
- } else if (*s == '=')
- return op_eq;
- else if (*s == '!' && *(s+1) == '=')
- return op_ne;
- return op_eq;
-}
-
-str
-PropertyOperatorString( prop_op_t op )
-{
- switch(op) {
- case op_lt: return "<";
- case op_lte: return "<=";
- default:
- case op_eq: return "=";
- case op_gte: return ">=";
- case op_gt: return ">";
- case op_ne: return "!=";
- }
-}
-
diff --git a/monetdb5/mal/mal_properties.h b/monetdb5/mal/mal_properties.h
deleted file mode 100644
--- a/monetdb5/mal/mal_properties.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2008-2015 MonetDB B.V.
- */
-
-#ifndef _MAL_PROPERTIES_
-#define _MAL_PROPERTIES_
-#include "mal.h"
-#include "mal_namespace.h"
-
-typedef enum prop_op_t {
- op_lt = 0,
- op_lte = 1,
- op_eq = 2,
- op_gte = 3,
- op_gt = 4,
- op_ne = 5
-} prop_op_t;
-
-mal_export sht PropertyIndex(str name);
-mal_export str PropertyName(sht idx);
-mal_export prop_op_t PropertyOperator( str s );
-mal_export str PropertyOperatorString( prop_op_t op );
-
-#endif
-
diff --git a/monetdb5/optimizer/opt_costModel.h
b/monetdb5/optimizer/opt_costModel.h
--- a/monetdb5/optimizer/opt_costModel.h
+++ b/monetdb5/optimizer/opt_costModel.h
@@ -12,7 +12,6 @@
#include "mal.h"
#include <math.h>
#include "mal_interpreter.h"
-#include "mal_properties.h"
#include "opt_support.h"
#include "opt_prelude.h"
diff --git a/monetdb5/optimizer/opt_garbageCollector.c
b/monetdb5/optimizer/opt_garbageCollector.c
--- a/monetdb5/optimizer/opt_garbageCollector.c
+++ b/monetdb5/optimizer/opt_garbageCollector.c
@@ -11,7 +11,6 @@
#include "mal_interpreter.h" /* for showErrors() */
#include "mal_builder.h"
#include "opt_prelude.h"
-#include "mal_properties.h"
/*
* Keeping variables around beyond their end-of-life-span
diff --git a/monetdb5/optimizer/opt_support.h b/monetdb5/optimizer/opt_support.h
--- a/monetdb5/optimizer/opt_support.h
+++ b/monetdb5/optimizer/opt_support.h
@@ -13,7 +13,6 @@
#include "mal_function.h"
#include "mal_scenario.h"
#include "mal_builder.h"
-#include "mal_properties.h"
#ifdef WIN32
#if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) &&
!defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) &&
!defined(LIBMONETDB5)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list