|
@@ -53,10 +53,10 @@ long IV2int(SV *in) {
|
|
/*
|
|
/*
|
|
* Returns the class part of the URI
|
|
* Returns the class part of the URI
|
|
*/
|
|
*/
|
|
-char *parseurl(const char* url) {
|
|
|
|
|
|
+char *parseurl(const str* url) {
|
|
char *cn;
|
|
char *cn;
|
|
|
|
|
|
- cn = strchr(url, ':') + 1;
|
|
|
|
|
|
+ cn = strchr(url->s, ':') + 1;
|
|
if (strlen(cn) > 0)
|
|
if (strlen(cn) > 0)
|
|
return cn;
|
|
return cn;
|
|
else
|
|
else
|
|
@@ -105,7 +105,7 @@ int checkobj(SV* obj) {
|
|
* Initialize database module
|
|
* Initialize database module
|
|
* No function should be called before this
|
|
* No function should be called before this
|
|
*/
|
|
*/
|
|
-db1_con_t* perlvdb_db_init(const char* url) {
|
|
|
|
|
|
+db1_con_t* perlvdb_db_init(const str* url) {
|
|
db1_con_t* res;
|
|
db1_con_t* res;
|
|
|
|
|
|
char *cn;
|
|
char *cn;
|
|
@@ -195,7 +195,7 @@ int perlvdb_db_insertreplace(db1_con_t* h, db_key_t* k, db_val_t* v,
|
|
return IV2int(ret);
|
|
return IV2int(ret);
|
|
}
|
|
}
|
|
|
|
|
|
-int perlvdb_db_insert(db1_con_t* h, db_key_t* k, db_val_t* v, int n) {
|
|
|
|
|
|
+int perlvdb_db_insert(const db1_con_t* h, const db_key_t* k, const db_val_t* v, const int n) {
|
|
return perlvdb_db_insertreplace(h, k, v, n, PERL_VDB_INSERTMETHOD);
|
|
return perlvdb_db_insertreplace(h, k, v, n, PERL_VDB_INSERTMETHOD);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -214,8 +214,8 @@ int perlvdb_db_replace(db1_con_t* h, db_key_t* k, db_val_t* v, int n) {
|
|
* v: values of the keys that must match
|
|
* v: values of the keys that must match
|
|
* n: number of key=value pairs
|
|
* n: number of key=value pairs
|
|
*/
|
|
*/
|
|
-int perlvdb_db_delete(db1_con_t* h, db_key_t* k, db_op_t* o, db_val_t* v,
|
|
|
|
- int n) {
|
|
|
|
|
|
+int perlvdb_db_delete(const db1_con_t* h, const db_key_t* k, const db_op_t* o,
|
|
|
|
+ const db_val_t* v, const int n) {
|
|
AV *arr;
|
|
AV *arr;
|
|
SV *arrref;
|
|
SV *arrref;
|
|
SV *ret;
|
|
SV *ret;
|
|
@@ -242,8 +242,9 @@ int perlvdb_db_delete(db1_con_t* h, db_key_t* k, db_op_t* o, db_val_t* v,
|
|
* _n: number of key=value pairs
|
|
* _n: number of key=value pairs
|
|
* _un: number of columns to update
|
|
* _un: number of columns to update
|
|
*/
|
|
*/
|
|
-int perlvdb_db_update(db1_con_t* h, db_key_t* k, db_op_t* o, db_val_t* v,
|
|
|
|
- db_key_t* uk, db_val_t* uv, int n, int un) {
|
|
|
|
|
|
+int perlvdb_db_update(const db1_con_t* h, const db_key_t* k, const db_op_t* o,
|
|
|
|
+ const db_val_t* v, const db_key_t* uk, const db_val_t* uv,
|
|
|
|
+ const int n, const int un) {
|
|
|
|
|
|
AV *condarr;
|
|
AV *condarr;
|
|
AV *updatearr;
|
|
AV *updatearr;
|
|
@@ -280,9 +281,9 @@ int perlvdb_db_update(db1_con_t* h, db_key_t* k, db_op_t* o, db_val_t* v,
|
|
* nc: number of columns to return
|
|
* nc: number of columns to return
|
|
* o: order by the specified column
|
|
* o: order by the specified column
|
|
*/
|
|
*/
|
|
-int perlvdb_db_query(db1_con_t* h, db_key_t* k, db_op_t* op, db_val_t* v,
|
|
|
|
- db_key_t* c, int n, int nc,
|
|
|
|
- db_key_t o, db1_res_t** r) {
|
|
|
|
|
|
+int perlvdb_db_query(const db1_con_t* h, const db_key_t* k, const db_op_t* op,
|
|
|
|
+ const db_val_t* v, const db_key_t* c, const int n, const int nc,
|
|
|
|
+ const db_key_t o, db1_res_t** r) {
|
|
|
|
|
|
|
|
|
|
AV *condarr;
|
|
AV *condarr;
|