Skip to content

Commit

Permalink
Update c++ prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
GrieferAtWork committed Dec 15, 2024
1 parent 6bc5799 commit 80225c7
Show file tree
Hide file tree
Showing 8 changed files with 1,428 additions and 590 deletions.
55 changes: 16 additions & 39 deletions include/deemon/cxx/dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,13 @@ class Dict

public:
/*[[[deemon (CxxType from rt.gen.cxxapi)(Dict from deemon).printCxxApi(templateParameters: {"Key", "Value"});]]]*/
WUNUSED NONNULL_CXX((1)) Ref<Value> (get)(DeeObject *key) {
WUNUSED NONNULL_CXX((1)) Ref<Sequence<_AbstractTuple<Key, Value> > > (byhash)(DeeObject *template_) {
DeeObject *args[1];
args[0] = key;
return inherit(DeeObject_CallAttrStringHash(this, "get", _Dee_HashSelectC(0x3b6d35a2, 0x7c8e1568eac4979f), 1, args));
args[0] = template_;
return inherit(DeeObject_CallAttrStringHash(this, "byhash", _Dee_HashSelectC(0x7b5277ce, 0x773c8074445a28d9), 1, args));
}
WUNUSED NONNULL_CXX((1, 2)) Ref<Value> (get)(DeeObject *key, DeeObject *def) {
DeeObject *args[2];
args[0] = key;
args[1] = def;
return inherit(DeeObject_CallAttrStringHash(this, "get", _Dee_HashSelectC(0x3b6d35a2, 0x7c8e1568eac4979f), 2, args));
void (clear)() {
decref(throw_if_null(DeeObject_CallAttrStringHash(this, "clear", _Dee_HashSelectC(0x7857faae, 0x22a34b6f82b3b83c), 0, NULL)));
}
WUNUSED NONNULL_CXX((1)) Ref<Value> (pop)(DeeObject *key) {
DeeObject *args[1];
Expand All @@ -82,56 +79,36 @@ class Dict
args[1] = def;
return inherit(DeeObject_CallAttrStringHash(this, "pop", _Dee_HashSelectC(0x960361ff, 0x666fb01461b0a0eb), 2, args));
}
void (clear)() {
decref(throw_if_null(DeeObject_CallAttrStringHash(this, "clear", _Dee_HashSelectC(0x7857faae, 0x22a34b6f82b3b83c), 0, NULL)));
}
WUNUSED Ref<_AbstractTuple<Key, Value> > (popitem)() {
return inherit(DeeObject_CallAttrStringHash(this, "popitem", _Dee_HashSelectC(0x40b249f3, 0x131a404a88439bc0), 0, NULL));
}
WUNUSED NONNULL_CXX((1)) Ref<Value> (setdefault)(DeeObject *key) {
DeeObject *args[1];
args[0] = key;
return inherit(DeeObject_CallAttrStringHash(this, "setdefault", _Dee_HashSelectC(0x947d5cce, 0x7cbcb4f64ace9cbc), 1, args));
}
WUNUSED NONNULL_CXX((1, 2)) Ref<Value> (setdefault)(DeeObject *key, DeeObject *def) {
DeeObject *args[2];
args[0] = key;
args[1] = def;
return inherit(DeeObject_CallAttrStringHash(this, "setdefault", _Dee_HashSelectC(0x947d5cce, 0x7cbcb4f64ace9cbc), 2, args));
}
WUNUSED NONNULL_CXX((1, 2)) Ref<deemon::bool_> (setold)(DeeObject *key, DeeObject *value) {
WUNUSED NONNULL_CXX((1, 2)) Ref<_AbstractTuple<deemon::bool_, Value> > (setold_ex)(DeeObject *key, DeeObject *value) {
DeeObject *args[2];
args[0] = key;
args[1] = value;
return inherit(DeeObject_CallAttrStringHash(this, "setold", _Dee_HashSelectC(0xb02a28d9, 0xe69353d27a45da0c), 2, args));
return inherit(DeeObject_CallAttrStringHash(this, "setold_ex", _Dee_HashSelectC(0xf8b4d68b, 0x73d8fdc770be1ae), 2, args));
}
WUNUSED NONNULL_CXX((1, 2)) Ref<deemon::bool_> (setnew)(DeeObject *key, DeeObject *value) {
WUNUSED NONNULL_CXX((1, 2)) Ref<_AbstractTuple<deemon::bool_, Value> > (setnew_ex)(DeeObject *key, DeeObject *value) {
DeeObject *args[2];
args[0] = key;
args[1] = value;
return inherit(DeeObject_CallAttrStringHash(this, "setnew", _Dee_HashSelectC(0xb6040b2, 0xde8a8697e7aca93d), 2, args));
return inherit(DeeObject_CallAttrStringHash(this, "setnew_ex", _Dee_HashSelectC(0x3f694391, 0x104d84a2d9986bc5), 2, args));
}
WUNUSED NONNULL_CXX((1, 2)) Ref<_AbstractTuple<deemon::bool_, Value> > (setold_ex)(DeeObject *key, DeeObject *value) {
WUNUSED NONNULL_CXX((1, 2)) Ref<Value> (setdefault)(DeeObject *key, DeeObject *value) {
DeeObject *args[2];
args[0] = key;
args[1] = value;
return inherit(DeeObject_CallAttrStringHash(this, "setold_ex", _Dee_HashSelectC(0xf8b4d68b, 0x73d8fdc770be1ae), 2, args));
return inherit(DeeObject_CallAttrStringHash(this, "setdefault", _Dee_HashSelectC(0x947d5cce, 0x7cbcb4f64ace9cbc), 2, args));
}
WUNUSED NONNULL_CXX((1, 2)) Ref<_AbstractTuple<deemon::bool_, Value> > (setnew_ex)(DeeObject *key, DeeObject *value) {
DeeObject *args[2];
args[0] = key;
args[1] = value;
return inherit(DeeObject_CallAttrStringHash(this, "setnew_ex", _Dee_HashSelectC(0x3f694391, 0x104d84a2d9986bc5), 2, args));
WUNUSED Ref<_AbstractTuple<Key, Value> > (popitem)() {
return inherit(DeeObject_CallAttrStringHash(this, "popitem", _Dee_HashSelectC(0x40b249f3, 0x131a404a88439bc0), 0, NULL));
}
NONNULL_CXX((1)) void (update)(DeeObject *items) {
DeeObject *args[1];
args[0] = items;
decref(throw_if_null(DeeObject_CallAttrStringHash(this, "update", _Dee_HashSelectC(0xdf8e9237, 0x41c79529f2460018), 1, args)));
}
WUNUSED NONNULL_CXX((1)) Ref<Sequence<_AbstractTuple<Key, Value> > > (byhash)(DeeObject *template_) {
WUNUSED NONNULL_CXX((1)) Ref<deemon::bool_> (remove)(DeeObject *key) {
DeeObject *args[1];
args[0] = template_;
return inherit(DeeObject_CallAttrStringHash(this, "byhash", _Dee_HashSelectC(0x7b5277ce, 0x773c8074445a28d9), 1, args));
args[0] = key;
return inherit(DeeObject_CallAttrStringHash(this, "remove", _Dee_HashSelectC(0x3d2727dd, 0xe9f313a03e2051a), 1, args));
}
class _Wrap_keys
: public deemon::detail::ConstGetRefProxy<_Wrap_keys, Sequence<Key> > {
Expand Down
51 changes: 28 additions & 23 deletions include/deemon/cxx/hashset.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,39 +92,39 @@ class HashSet: public Set<T> {

public:
/*[[[deemon (CxxType from rt.gen.cxxapi)(HashSet from deemon).printCxxApi(templateParameters: { "T" });]]]*/
WUNUSED Ref<T> (pop)() {
return inherit(DeeObject_CallAttrStringHash(this, "pop", _Dee_HashSelectC(0x960361ff, 0x666fb01461b0a0eb), 0, NULL));
}
void (clear)() {
decref(throw_if_null(DeeObject_CallAttrStringHash(this, "clear", _Dee_HashSelectC(0x7857faae, 0x22a34b6f82b3b83c), 0, NULL)));
WUNUSED NONNULL_CXX((1)) Ref<deemon::bool_> (insert)(DeeObject *key) {
DeeObject *args[1];
args[0] = key;
return inherit(DeeObject_CallAttrStringHash(this, "insert", _Dee_HashSelectC(0x71d74a66, 0x5e168c86241590d7), 1, args));
}
WUNUSED Ref<T> (popitem)() {
return inherit(DeeObject_CallAttrStringHash(this, "popitem", _Dee_HashSelectC(0x40b249f3, 0x131a404a88439bc0), 0, NULL));
WUNUSED NONNULL_CXX((1)) Ref<deemon::bool_> (remove)(DeeObject *key) {
DeeObject *args[1];
args[0] = key;
return inherit(DeeObject_CallAttrStringHash(this, "remove", _Dee_HashSelectC(0x3d2727dd, 0xe9f313a03e2051a), 1, args));
}
WUNUSED NONNULL_CXX((1)) Ref<T> (unify)(DeeObject *ob) {
WUNUSED NONNULL_CXX((1)) Ref<T> (unify)(DeeObject *key) {
DeeObject *args[1];
args[0] = ob;
args[0] = key;
return inherit(DeeObject_CallAttrStringHash(this, "unify", _Dee_HashSelectC(0x3cce686e, 0x4c0c9bdcc8d95cc7), 1, args));
}
WUNUSED NONNULL_CXX((1)) Ref<deemon::bool_> (insert)(DeeObject *ob) {
DeeObject *args[1];
args[0] = ob;
return inherit(DeeObject_CallAttrStringHash(this, "insert", _Dee_HashSelectC(0x71d74a66, 0x5e168c86241590d7), 1, args));
WUNUSED Ref<T> (pop)() {
return inherit(DeeObject_CallAttrStringHash(this, "pop", _Dee_HashSelectC(0x960361ff, 0x666fb01461b0a0eb), 0, NULL));
}
WUNUSED NONNULL_CXX((1)) Ref<deemon::int_> (update)(DeeObject *items) {
WUNUSED NONNULL_CXX((1)) Ref<T> (pop)(DeeObject *def) {
DeeObject *args[1];
args[0] = items;
return inherit(DeeObject_CallAttrStringHash(this, "update", _Dee_HashSelectC(0xdf8e9237, 0x41c79529f2460018), 1, args));
args[0] = def;
return inherit(DeeObject_CallAttrStringHash(this, "pop", _Dee_HashSelectC(0x960361ff, 0x666fb01461b0a0eb), 1, args));
}
WUNUSED NONNULL_CXX((1)) Ref<deemon::int_> (insertall)(DeeObject *items) {
DeeObject *args[1];
args[0] = items;
return inherit(DeeObject_CallAttrStringHash(this, "insertall", _Dee_HashSelectC(0xbf9bc3a9, 0x4f85971d093a27f2), 1, args));
void (clear)() {
decref(throw_if_null(DeeObject_CallAttrStringHash(this, "clear", _Dee_HashSelectC(0x7857faae, 0x22a34b6f82b3b83c), 0, NULL)));
}
WUNUSED NONNULL_CXX((1)) Ref<deemon::bool_> (remove)(DeeObject *ob) {
WUNUSED Ref<T> (popitem)() {
return inherit(DeeObject_CallAttrStringHash(this, "popitem", _Dee_HashSelectC(0x40b249f3, 0x131a404a88439bc0), 0, NULL));
}
WUNUSED NONNULL_CXX((1)) Ref<T> (popitem)(DeeObject *def) {
DeeObject *args[1];
args[0] = ob;
return inherit(DeeObject_CallAttrStringHash(this, "remove", _Dee_HashSelectC(0x3d2727dd, 0xe9f313a03e2051a), 1, args));
args[0] = def;
return inherit(DeeObject_CallAttrStringHash(this, "popitem", _Dee_HashSelectC(0x40b249f3, 0x131a404a88439bc0), 1, args));
}
WUNUSED NONNULL_CXX((1)) Ref<deemon::bool_> (add)(DeeObject *ob) {
DeeObject *args[1];
Expand All @@ -136,6 +136,11 @@ class HashSet: public Set<T> {
args[0] = ob;
return inherit(DeeObject_CallAttrStringHash(this, "discard", _Dee_HashSelectC(0x60249e06, 0xc8fe11c3fc0b52e6), 1, args));
}
WUNUSED NONNULL_CXX((1)) Ref<deemon::int_> (update)(DeeObject *items) {
DeeObject *args[1];
args[0] = items;
return inherit(DeeObject_CallAttrStringHash(this, "update", _Dee_HashSelectC(0xdf8e9237, 0x41c79529f2460018), 1, args));
}
WUNUSED NONNULL_CXX((1)) Ref<deemon::bool_> (insert_all)(DeeObject *ob) {
DeeObject *args[1];
args[0] = ob;
Expand Down
Loading

0 comments on commit 80225c7

Please sign in to comment.