… | |
… | |
53 | #if DB_VERSION_MINOR >= 3 |
53 | #if DB_VERSION_MINOR >= 3 |
54 | typedef DB_SEQUENCE DB_SEQUENCE_ornull; |
54 | typedef DB_SEQUENCE DB_SEQUENCE_ornull; |
55 | typedef DB_SEQUENCE DB_SEQUENCE_ornuked; |
55 | typedef DB_SEQUENCE DB_SEQUENCE_ornuked; |
56 | #endif |
56 | #endif |
57 | |
57 | |
58 | typedef SV SV8; /* byte-sv, used for argument-checking */ |
|
|
59 | typedef char *bdb_filename; |
58 | typedef char *bdb_filename; |
60 | |
59 | |
61 | static SV *prepare_cb; |
60 | static SV *prepare_cb; |
62 | |
61 | |
63 | #if DB_VERSION_MINOR >= 6 |
62 | #if DB_VERSION_MINOR >= 6 |
… | |
… | |
1910 | CALLBACK |
1909 | CALLBACK |
1911 | CODE: |
1910 | CODE: |
1912 | { |
1911 | { |
1913 | if (flags & DB_OPFLAGS_MASK != DB_SET && SvREADONLY (key)) |
1912 | if (flags & DB_OPFLAGS_MASK != DB_SET && SvREADONLY (key)) |
1914 | croak ("db_c_get was passed a read-only/constant 'key' argument but operation is not DB_SET"); |
1913 | croak ("db_c_get was passed a read-only/constant 'key' argument but operation is not DB_SET"); |
|
|
1914 | if (SvPOKp (key) && !sv_utf8_downgrade (key, 1)) |
|
|
1915 | croak ("argument \"%s\" must be byte/octet-encoded in %s", |
|
|
1916 | "key", |
|
|
1917 | "BDB::db_c_get"); |
1915 | |
1918 | |
1916 | { |
1919 | { |
1917 | dREQ (REQ_C_GET, 1); |
1920 | dREQ (REQ_C_GET, 1); |
1918 | req->dbc = dbc; |
1921 | req->dbc = dbc; |
1919 | req->uint1 = flags; |
1922 | req->uint1 = flags; |
… | |
… | |
1946 | CALLBACK |
1949 | CALLBACK |
1947 | CODE: |
1950 | CODE: |
1948 | { |
1951 | { |
1949 | if (flags & DB_OPFLAGS_MASK != DB_SET && SvREADONLY (key)) |
1952 | if (flags & DB_OPFLAGS_MASK != DB_SET && SvREADONLY (key)) |
1950 | croak ("db_c_pget was passed a read-only/constant 'key' argument but operation is not DB_SET"); |
1953 | croak ("db_c_pget was passed a read-only/constant 'key' argument but operation is not DB_SET"); |
|
|
1954 | if (SvPOKp (key) && !sv_utf8_downgrade (key, 1)) |
|
|
1955 | croak ("argument \"%s\" must be byte/octet-encoded in %s", |
|
|
1956 | "key", |
|
|
1957 | "BDB::db_c_pget"); |
1951 | |
1958 | |
1952 | { |
1959 | { |
1953 | dREQ (REQ_C_PGET, 1); |
1960 | dREQ (REQ_C_PGET, 1); |
1954 | req->dbc = dbc; |
1961 | req->dbc = dbc; |
1955 | req->uint1 = flags; |
1962 | req->uint1 = flags; |