Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- name: Build Python module
run: |
python setup.py update
export CXXFLAGS="-std=c++14"
python setup.py build
python setup.py install
- name: Test Python module
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@

# Project specific auto-generated files
/pytsk3.c
/pytsk3.cpp
10 changes: 9 additions & 1 deletion aff4_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

#include "class.h"

#ifdef __cplusplus
extern "C" {
#endif

// Some helpful little things
#define ERROR_BUFFER_SIZE 1024

Expand All @@ -38,7 +42,7 @@
// Reserved for impossible conditions
#define EProgrammingError 10

DLL_PUBLIC void *aff4_raise_errors(int t, char *string, ...);
DLL_PUBLIC void *aff4_raise_errors(int t, const char *string, ...);

/** We only set the error state if its not already set */
#define RaiseError(t, message, ...) \
Expand Down Expand Up @@ -72,4 +76,8 @@ DLL_PUBLIC int *aff4_get_current_error(char **error_str);

#define POP_ERROR_STATE *tmp_error_p = tmp_error;};

#ifdef __cplusplus
} /* closing brace for extern "C" */
#endif

#endif /* !AFF4_ERRORS_H_ */
10 changes: 5 additions & 5 deletions class.c → class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
// Noone should instantiate Object directly. this should be already
// allocated therefore:

DLL_PUBLIC void Object_init(Object this) {
this->__class__ = &__Object;
this->__super__ = NULL;
DLL_PUBLIC void Object_init(Object cthis) {
cthis->__class__ = &__Object;
cthis->__super__ = NULL;
};

struct Object_t __Object = {
Expand All @@ -36,10 +36,10 @@ struct Object_t __Object = {
NULL //.__extension
};

int issubclass(Object obj, Object class) {
int issubclass(Object obj, Object cclass) {
obj = obj->__class__;
while(1) {
if(obj == class->__class__)
if(obj == cclass->__class__)
return 1;

obj=obj->__super__;
Expand Down
Loading