Skip to content

Commit

Permalink
rewrite filter/stream callbacks in C
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed Oct 24, 2023
1 parent fb42553 commit 100009d
Show file tree
Hide file tree
Showing 9 changed files with 739 additions and 484 deletions.
2 changes: 1 addition & 1 deletion pygit2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from .credentials import *
from .errors import check_error, Passthrough
from .ffi import ffi, C
from .filter import Filter, FilterSource, filter_register, filter_unregister
from .filter import Filter
from .index import Index, IndexEntry
from .remote import Remote
from .repository import Repository
Expand Down
28 changes: 0 additions & 28 deletions pygit2/decl/callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,31 +65,3 @@ extern "Python" void _checkout_progress_cb(
extern "Python" int _stash_apply_progress_cb(
git_stash_apply_progress_t progress,
void *payload);

extern "Python" void _filter_shutdown_cb(git_filter *self);

extern "Python" int _filter_check_cb(
git_filter *self,
void **payload,
const git_filter_source *src,
const char **attr_values);

extern "Python" int _filter_stream_cb(
git_writestream **out,
git_filter *self,
void **payload,
const git_filter_source *src,
git_writestream *next);

extern "Python" void _filter_cleanup_cb(
git_filter *self,
void *payload);

extern "Python" int _writestream_write_cb(
git_writestream *stream,
const char *buffer,
size_t len);

extern "Python" int _writestream_close_cb(git_writestream *stream);

extern "Python" void _writestream_free_cb(git_writestream *stream);
68 changes: 0 additions & 68 deletions pygit2/decl/filter.h

This file was deleted.

7 changes: 0 additions & 7 deletions pygit2/decl/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ typedef struct git_submodule git_submodule;
typedef struct git_transport git_transport;
typedef struct git_tree git_tree;
typedef struct git_packbuilder git_packbuilder;
typedef struct git_writestream git_writestream;

struct git_writestream {
int (*write)(git_writestream *stream, const char *buffer, size_t len);
int (*close)(git_writestream *stream);
void (*free)(git_writestream *stream);
};

typedef int64_t git_off_t;
typedef int64_t git_time_t;
Expand Down
Loading

0 comments on commit 100009d

Please sign in to comment.