Commit ec5e7aa6 authored by Kevin Modzelewski's avatar Kevin Modzelewski

fix annotations

parent 80ae7847
......@@ -184,8 +184,6 @@ PyAPI_FUNC(void) PyGC_Disable() PYSTON_NOEXCEPT;
extern "C" {
#endif
PyObject* PyModule_GetDict(PyObject*) PYSTON_NOEXCEPT;
// Pyston change : expose these type objects
extern PyTypeObject Pattern_Type;
extern PyTypeObject Match_Type;
......
......@@ -10,7 +10,6 @@ extern "C" {
// Pyston addition: refcounting annotations:
#define BORROWED(T) T
#define STOLEN(T) T
#define WEAK(T) T
/* Object and type object interface */
......
......@@ -81,7 +81,7 @@ public:
llvm::StringRef s() const;
operator llvm::StringRef() const { return s(); }
operator BoxedString*() const { return getBox(); }
operator BORROWED(BoxedString*)() const { return getBox(); }
bool isCompilerCreatedName() const;
......
......@@ -2127,7 +2127,7 @@ public:
// or PyModule_GetDict to return real dicts.
class AttrWrapper : public Box {
private:
WEAK(Box*) b; // The parent object ('b') will keep the attrwrapper alive (forever)
BORROWED(Box*) b; // The parent object ('b') will keep the attrwrapper alive (forever)
void convertToDictBacked() {
HCAttrs* attrs = this->b->getHCAttrsPtr();
......
......@@ -1317,7 +1317,7 @@ inline BoxedString* getStaticString(llvm::StringRef s) {
extern "C" volatile int _pendingcalls_to_do;
inline Box* Box::getattrString(const char* attr) {
inline BORROWED(Box*) Box::getattrString(const char* attr) {
// XXX need to auto-decref
BoxedString* s = internStringMortal(attr);
try {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment