More PR comments.
diff --git a/python/descriptor_pool.c b/python/descriptor_pool.c
index 7b43457..920074f 100644
--- a/python/descriptor_pool.c
+++ b/python/descriptor_pool.c
@@ -41,8 +41,8 @@
PyObject* db;
} PyUpb_DescriptorPool;
-PyObject *PyUpb_DescriptorPool_GetDefaultPool() {
- PyUpb_ModuleState *s = PyUpb_ModuleState_Get();
+PyObject* PyUpb_DescriptorPool_GetDefaultPool() {
+ PyUpb_ModuleState* s = PyUpb_ModuleState_Get();
return s->default_pool;
}
@@ -57,7 +57,7 @@
return &pool->ob_base;
}
-upb_symtab *PyUpb_DescriptorPool_GetSymtab(PyObject *pool) {
+upb_symtab* PyUpb_DescriptorPool_GetSymtab(PyObject* pool) {
return ((PyUpb_DescriptorPool*)pool)->symtab;
}
@@ -72,8 +72,8 @@
return 0;
}
-PyObject* PyUpb_DescriptorPool_Get(const upb_symtab *symtab) {
- PyObject *pool = PyUpb_ObjCache_Get(symtab);
+PyObject* PyUpb_DescriptorPool_Get(const upb_symtab* symtab) {
+ PyObject* pool = PyUpb_ObjCache_Get(symtab);
assert(pool);
return pool;
}
@@ -117,6 +117,7 @@
char* buf;
Py_ssize_t size;
upb_arena* arena = upb_arena_new();
+ if (!arena) PYUPB_RETURN_OOM;
PyObject* result = NULL;
if (self->db) {