Skip to content
Browse files

Here are the other files h2xs gave me

I managed to get it going with some C::Scan thingy that pre-generated a lot
of copy; perhaps some of it will be useful but I'll leave it here for now.
  • Loading branch information...
1 parent 0299bf7 commit a3ae72ac1dca011f68ef42afb77a384b573b049d @samv samv committed
Showing with 1,292 additions and 0 deletions.
  1. +912 −0 Libgit2.xs.all
  2. +307 −0 lib/Git/Libgit2.pm.all
  3. +73 −0 typemap.all
View
912 Libgit2.xs.all
@@ -0,0 +1,912 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include "ppport.h"
+
+#include <git2.h>
+#include <git2/blob.h>
+#include <git2/commit.h>
+#include <git2/common.h>
+#include <git2/errors.h>
+#include <git2/index.h>
+#include <git2/object.h>
+#include <git2/odb_backend.h>
+#include <git2/odb.h>
+#include <git2/oid.h>
+#include <git2/refs.h>
+#include <git2/repository.h>
+#include <git2/revwalk.h>
+#include <git2/signature.h>
+#include <git2/tag.h>
+#include <git2/thread-utils.h>
+#include <git2/tree.h>
+#include <git2/zlib.h>
+
+
+MODULE = Git::LibGit2 PACKAGE = Git::LibGit2
+
+
+int
+git_oid_shorten_add(os, text_oid)
+ git_oid_shorten * os
+ const char * text_oid
+
+void
+git_oid_shorten_free(os)
+ git_oid_shorten * os
+
+git_oid_shorten *
+git_oid_shorten_new(min_length)
+ size_t min_length
+
+MODULE = Git::LibGit2 PACKAGE = git_index_entry
+
+git_index_entry *
+_to_ptr(THIS)
+ git_index_entry THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "git_index_entry")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (git_index_entry *)s;
+ }
+ else
+ croak("THIS is not of type git_index_entry");
+ OUTPUT:
+ RETVAL
+
+git_index_entry
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = git_index_entryPtr
+
+git_index_time *
+ctime(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ git_index_time __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->ctime = __value;
+ RETVAL = &(THIS->ctime);
+ OUTPUT:
+ RETVAL
+
+git_index_time *
+mtime(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ git_index_time __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->mtime = __value;
+ RETVAL = &(THIS->mtime);
+ OUTPUT:
+ RETVAL
+
+unsigned int
+dev(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ unsigned int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->dev = __value;
+ RETVAL = THIS->dev;
+ OUTPUT:
+ RETVAL
+
+unsigned int
+ino(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ unsigned int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->ino = __value;
+ RETVAL = THIS->ino;
+ OUTPUT:
+ RETVAL
+
+unsigned int
+mode(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ unsigned int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->mode = __value;
+ RETVAL = THIS->mode;
+ OUTPUT:
+ RETVAL
+
+unsigned int
+uid(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ unsigned int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->uid = __value;
+ RETVAL = THIS->uid;
+ OUTPUT:
+ RETVAL
+
+unsigned int
+gid(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ unsigned int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->gid = __value;
+ RETVAL = THIS->gid;
+ OUTPUT:
+ RETVAL
+
+git_off_t
+file_size(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ git_off_t __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->file_size = __value;
+ RETVAL = THIS->file_size;
+ OUTPUT:
+ RETVAL
+
+git_oid *
+oid(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ git_oid __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->oid = __value;
+ RETVAL = &(THIS->oid);
+ OUTPUT:
+ RETVAL
+
+unsigned short
+flags(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ unsigned short __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->flags = __value;
+ RETVAL = THIS->flags;
+ OUTPUT:
+ RETVAL
+
+unsigned short
+flags_extended(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ unsigned short __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->flags_extended = __value;
+ RETVAL = THIS->flags_extended;
+ OUTPUT:
+ RETVAL
+
+char *
+path(THIS, __value = NO_INIT)
+ git_index_entry * THIS
+ char * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->path = __value;
+ RETVAL = THIS->path;
+ OUTPUT:
+ RETVAL
+
+
+MODULE = Git::LibGit2 PACKAGE = fd_set
+
+fd_set *
+_to_ptr(THIS)
+ fd_set THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "fd_set")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (fd_set *)s;
+ }
+ else
+ croak("THIS is not of type fd_set");
+ OUTPUT:
+ RETVAL
+
+fd_set
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = git_time
+
+git_time *
+_to_ptr(THIS)
+ git_time THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "git_time")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (git_time *)s;
+ }
+ else
+ croak("THIS is not of type git_time");
+ OUTPUT:
+ RETVAL
+
+git_time
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = git_timePtr
+
+time_t
+time(THIS, __value = NO_INIT)
+ git_time * THIS
+ time_t __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->time = __value;
+ RETVAL = THIS->time;
+ OUTPUT:
+ RETVAL
+
+int
+offset(THIS, __value = NO_INIT)
+ git_time * THIS
+ int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->offset = __value;
+ RETVAL = THIS->offset;
+ OUTPUT:
+ RETVAL
+
+
+MODULE = Git::LibGit2 PACKAGE = git_signature
+
+git_signature *
+_to_ptr(THIS)
+ git_signature THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "git_signature")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (git_signature *)s;
+ }
+ else
+ croak("THIS is not of type git_signature");
+ OUTPUT:
+ RETVAL
+
+git_signature
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = git_signaturePtr
+
+char *
+name(THIS, __value = NO_INIT)
+ git_signature * THIS
+ char * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->name = __value;
+ RETVAL = THIS->name;
+ OUTPUT:
+ RETVAL
+
+char *
+email(THIS, __value = NO_INIT)
+ git_signature * THIS
+ char * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->email = __value;
+ RETVAL = THIS->email;
+ OUTPUT:
+ RETVAL
+
+git_time *
+when(THIS, __value = NO_INIT)
+ git_signature * THIS
+ git_time __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->when = __value;
+ RETVAL = &(THIS->when);
+ OUTPUT:
+ RETVAL
+
+
+MODULE = Git::LibGit2 PACKAGE = z_stream
+
+z_stream *
+_to_ptr(THIS)
+ z_stream THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "z_stream")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (z_stream *)s;
+ }
+ else
+ croak("THIS is not of type z_stream");
+ OUTPUT:
+ RETVAL
+
+z_stream
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = z_streamPtr
+
+Bytef *
+next_in(THIS, __value = NO_INIT)
+ z_stream * THIS
+ Bytef * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->next_in = __value;
+ RETVAL = THIS->next_in;
+ OUTPUT:
+ RETVAL
+
+uInt
+avail_in(THIS, __value = NO_INIT)
+ z_stream * THIS
+ uInt __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->avail_in = __value;
+ RETVAL = THIS->avail_in;
+ OUTPUT:
+ RETVAL
+
+uLong
+total_in(THIS, __value = NO_INIT)
+ z_stream * THIS
+ uLong __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->total_in = __value;
+ RETVAL = THIS->total_in;
+ OUTPUT:
+ RETVAL
+
+Bytef *
+next_out(THIS, __value = NO_INIT)
+ z_stream * THIS
+ Bytef * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->next_out = __value;
+ RETVAL = THIS->next_out;
+ OUTPUT:
+ RETVAL
+
+uInt
+avail_out(THIS, __value = NO_INIT)
+ z_stream * THIS
+ uInt __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->avail_out = __value;
+ RETVAL = THIS->avail_out;
+ OUTPUT:
+ RETVAL
+
+uLong
+total_out(THIS, __value = NO_INIT)
+ z_stream * THIS
+ uLong __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->total_out = __value;
+ RETVAL = THIS->total_out;
+ OUTPUT:
+ RETVAL
+
+char *
+msg(THIS, __value = NO_INIT)
+ z_stream * THIS
+ char * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->msg = __value;
+ RETVAL = THIS->msg;
+ OUTPUT:
+ RETVAL
+
+struct internal_state *
+state(THIS, __value = NO_INIT)
+ z_stream * THIS
+ struct internal_state * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->state = __value;
+ RETVAL = THIS->state;
+ OUTPUT:
+ RETVAL
+
+alloc_func
+zalloc(THIS, __value = NO_INIT)
+ z_stream * THIS
+ alloc_func __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->zalloc = __value;
+ RETVAL = THIS->zalloc;
+ OUTPUT:
+ RETVAL
+
+free_func
+zfree(THIS, __value = NO_INIT)
+ z_stream * THIS
+ free_func __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->zfree = __value;
+ RETVAL = THIS->zfree;
+ OUTPUT:
+ RETVAL
+
+voidpf
+opaque(THIS, __value = NO_INIT)
+ z_stream * THIS
+ voidpf __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->opaque = __value;
+ RETVAL = THIS->opaque;
+ OUTPUT:
+ RETVAL
+
+int
+data_type(THIS, __value = NO_INIT)
+ z_stream * THIS
+ int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->data_type = __value;
+ RETVAL = THIS->data_type;
+ OUTPUT:
+ RETVAL
+
+uLong
+adler(THIS, __value = NO_INIT)
+ z_stream * THIS
+ uLong __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->adler = __value;
+ RETVAL = THIS->adler;
+ OUTPUT:
+ RETVAL
+
+uLong
+reserved(THIS, __value = NO_INIT)
+ z_stream * THIS
+ uLong __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->reserved = __value;
+ RETVAL = THIS->reserved;
+ OUTPUT:
+ RETVAL
+
+
+MODULE = Git::LibGit2 PACKAGE = git_rawobj
+
+git_rawobj *
+_to_ptr(THIS)
+ git_rawobj THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "git_rawobj")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (git_rawobj *)s;
+ }
+ else
+ croak("THIS is not of type git_rawobj");
+ OUTPUT:
+ RETVAL
+
+git_rawobj
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = git_rawobjPtr
+
+void *
+data(THIS, __value = NO_INIT)
+ git_rawobj * THIS
+ void * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->data = __value;
+ RETVAL = THIS->data;
+ OUTPUT:
+ RETVAL
+
+size_t
+len(THIS, __value = NO_INIT)
+ git_rawobj * THIS
+ size_t __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->len = __value;
+ RETVAL = THIS->len;
+ OUTPUT:
+ RETVAL
+
+git_otype
+type(THIS, __value = NO_INIT)
+ git_rawobj * THIS
+ git_otype __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->type = __value;
+ RETVAL = THIS->type;
+ OUTPUT:
+ RETVAL
+
+
+MODULE = Git::LibGit2 PACKAGE = gz_header
+
+gz_header *
+_to_ptr(THIS)
+ gz_header THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "gz_header")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (gz_header *)s;
+ }
+ else
+ croak("THIS is not of type gz_header");
+ OUTPUT:
+ RETVAL
+
+gz_header
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = gz_headerPtr
+
+int
+text(THIS, __value = NO_INIT)
+ gz_header * THIS
+ int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->text = __value;
+ RETVAL = THIS->text;
+ OUTPUT:
+ RETVAL
+
+uLong
+time(THIS, __value = NO_INIT)
+ gz_header * THIS
+ uLong __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->time = __value;
+ RETVAL = THIS->time;
+ OUTPUT:
+ RETVAL
+
+int
+xflags(THIS, __value = NO_INIT)
+ gz_header * THIS
+ int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->xflags = __value;
+ RETVAL = THIS->xflags;
+ OUTPUT:
+ RETVAL
+
+int
+os(THIS, __value = NO_INIT)
+ gz_header * THIS
+ int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->os = __value;
+ RETVAL = THIS->os;
+ OUTPUT:
+ RETVAL
+
+Bytef *
+extra(THIS, __value = NO_INIT)
+ gz_header * THIS
+ Bytef * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->extra = __value;
+ RETVAL = THIS->extra;
+ OUTPUT:
+ RETVAL
+
+uInt
+extra_len(THIS, __value = NO_INIT)
+ gz_header * THIS
+ uInt __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->extra_len = __value;
+ RETVAL = THIS->extra_len;
+ OUTPUT:
+ RETVAL
+
+uInt
+extra_max(THIS, __value = NO_INIT)
+ gz_header * THIS
+ uInt __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->extra_max = __value;
+ RETVAL = THIS->extra_max;
+ OUTPUT:
+ RETVAL
+
+Bytef *
+name(THIS, __value = NO_INIT)
+ gz_header * THIS
+ Bytef * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->name = __value;
+ RETVAL = THIS->name;
+ OUTPUT:
+ RETVAL
+
+uInt
+name_max(THIS, __value = NO_INIT)
+ gz_header * THIS
+ uInt __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->name_max = __value;
+ RETVAL = THIS->name_max;
+ OUTPUT:
+ RETVAL
+
+Bytef *
+comment(THIS, __value = NO_INIT)
+ gz_header * THIS
+ Bytef * __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->comment = __value;
+ RETVAL = THIS->comment;
+ OUTPUT:
+ RETVAL
+
+uInt
+comm_max(THIS, __value = NO_INIT)
+ gz_header * THIS
+ uInt __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->comm_max = __value;
+ RETVAL = THIS->comm_max;
+ OUTPUT:
+ RETVAL
+
+int
+hcrc(THIS, __value = NO_INIT)
+ gz_header * THIS
+ int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->hcrc = __value;
+ RETVAL = THIS->hcrc;
+ OUTPUT:
+ RETVAL
+
+int
+done(THIS, __value = NO_INIT)
+ gz_header * THIS
+ int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->done = __value;
+ RETVAL = THIS->done;
+ OUTPUT:
+ RETVAL
+
+
+MODULE = Git::LibGit2 PACKAGE = git_oid
+
+git_oid *
+_to_ptr(THIS)
+ git_oid THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "git_oid")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (git_oid *)s;
+ }
+ else
+ croak("THIS is not of type git_oid");
+ OUTPUT:
+ RETVAL
+
+git_oid
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+
+MODULE = Git::LibGit2 PACKAGE = git_index_time
+
+git_index_time *
+_to_ptr(THIS)
+ git_index_time THIS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ if (sv_derived_from(ST(0), "git_index_time")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV(ST(0)), len);
+ if (len != sizeof(THIS))
+ croak("Size %d of packed data != expected %d",
+ len, sizeof(THIS));
+ RETVAL = (git_index_time *)s;
+ }
+ else
+ croak("THIS is not of type git_index_time");
+ OUTPUT:
+ RETVAL
+
+git_index_time
+new(CLASS)
+ char *CLASS = NO_INIT
+ PROTOTYPE: $
+ CODE:
+ Zero((void*)&RETVAL, sizeof(RETVAL), char);
+ OUTPUT:
+ RETVAL
+
+MODULE = Git::LibGit2 PACKAGE = git_index_timePtr
+
+git_time_t
+seconds(THIS, __value = NO_INIT)
+ git_index_time * THIS
+ git_time_t __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->seconds = __value;
+ RETVAL = THIS->seconds;
+ OUTPUT:
+ RETVAL
+
+unsigned int
+nanoseconds(THIS, __value = NO_INIT)
+ git_index_time * THIS
+ unsigned int __value
+ PROTOTYPE: $;$
+ CODE:
+ if (items > 1)
+ THIS->nanoseconds = __value;
+ RETVAL = THIS->nanoseconds;
+ OUTPUT:
+ RETVAL
+
View
307 lib/Git/Libgit2.pm.all
@@ -0,0 +1,307 @@
+
+=head2 EXPORT
+
+None by default.
+
+=head2 Exportable functions
+
+ git_oid_shorten *git_oid_shorten_new(size_t min_length)
+ int git_oid_shorten_add(git_oid_shorten *os, const char *text_oid)
+ void git_oid_shorten_free(git_oid_shorten *os)
+
+=head2 Object and class methods for C<git_index_entry>/C<git_index_entryPtr>
+
+The principal Perl representation of a C object of type C<git_index_entry> is an
+object of class C<git_index_entryPtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = git_index_entry->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<git_index_entry>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_git_index_entry-E<gt>_to_ptr()>
+
+Converts an object of type C<git_index_entry> to an object of type C<git_index_entryPtr>.
+
+=item C<git_index_entry-E<gt>new()>
+
+Creates an empty object of type C<git_index_entry>. The corresponding packed
+string is zeroed out.
+
+=item C<ctime(...)>, C<mtime(...)>, C<dev(...)>, C<ino(...)>, C<mode(...)>, C<uid(...)>, C<gid(...)>, C<file_size(...)>, C<oid(...)>, C<flags(...)>, C<flags_extended(...)>, C<path(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<git_index_entryPtr>.
+
+=back
+
+
+=head2 Object and class methods for C<git_time>/C<git_timePtr>
+
+The principal Perl representation of a C object of type C<git_time> is an
+object of class C<git_timePtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = git_time->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<git_time>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_git_time-E<gt>_to_ptr()>
+
+Converts an object of type C<git_time> to an object of type C<git_timePtr>.
+
+=item C<git_time-E<gt>new()>
+
+Creates an empty object of type C<git_time>. The corresponding packed
+string is zeroed out.
+
+=item C<time(...)>, C<offset(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<git_timePtr>.
+
+=back
+
+
+=head2 Object and class methods for C<git_signature>/C<git_signaturePtr>
+
+The principal Perl representation of a C object of type C<git_signature> is an
+object of class C<git_signaturePtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = git_signature->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<git_signature>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_git_signature-E<gt>_to_ptr()>
+
+Converts an object of type C<git_signature> to an object of type C<git_signaturePtr>.
+
+=item C<git_signature-E<gt>new()>
+
+Creates an empty object of type C<git_signature>. The corresponding packed
+string is zeroed out.
+
+=item C<name(...)>, C<email(...)>, C<when(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<git_signaturePtr>.
+
+=back
+
+
+=head2 Object and class methods for C<z_stream>/C<z_streamPtr>
+
+The principal Perl representation of a C object of type C<z_stream> is an
+object of class C<z_streamPtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = z_stream->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<z_stream>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_z_stream-E<gt>_to_ptr()>
+
+Converts an object of type C<z_stream> to an object of type C<z_streamPtr>.
+
+=item C<z_stream-E<gt>new()>
+
+Creates an empty object of type C<z_stream>. The corresponding packed
+string is zeroed out.
+
+=item C<next_in(...)>, C<avail_in(...)>, C<total_in(...)>, C<next_out(...)>, C<avail_out(...)>, C<total_out(...)>, C<msg(...)>, C<state(...)>, C<zalloc(...)>, C<zfree(...)>, C<opaque(...)>, C<data_type(...)>, C<adler(...)>, C<reserved(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<z_streamPtr>.
+
+=back
+
+
+=head2 Object and class methods for C<git_rawobj>/C<git_rawobjPtr>
+
+The principal Perl representation of a C object of type C<git_rawobj> is an
+object of class C<git_rawobjPtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = git_rawobj->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<git_rawobj>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_git_rawobj-E<gt>_to_ptr()>
+
+Converts an object of type C<git_rawobj> to an object of type C<git_rawobjPtr>.
+
+=item C<git_rawobj-E<gt>new()>
+
+Creates an empty object of type C<git_rawobj>. The corresponding packed
+string is zeroed out.
+
+=item C<data(...)>, C<len(...)>, C<type(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<git_rawobjPtr>.
+
+=back
+
+
+=head2 Object and class methods for C<gz_header>/C<gz_headerPtr>
+
+The principal Perl representation of a C object of type C<gz_header> is an
+object of class C<gz_headerPtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = gz_header->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<gz_header>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_gz_header-E<gt>_to_ptr()>
+
+Converts an object of type C<gz_header> to an object of type C<gz_headerPtr>.
+
+=item C<gz_header-E<gt>new()>
+
+Creates an empty object of type C<gz_header>. The corresponding packed
+string is zeroed out.
+
+=item C<text(...)>, C<time(...)>, C<xflags(...)>, C<os(...)>, C<extra(...)>, C<extra_len(...)>, C<extra_max(...)>, C<name(...)>, C<name_max(...)>, C<comment(...)>, C<comm_max(...)>, C<hcrc(...)>, C<done(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<gz_headerPtr>.
+
+=back
+
+
+=head2 Object and class methods for C<git_oid>/C<git_oidPtr>
+
+The principal Perl representation of a C object of type C<git_oid> is an
+object of class C<git_oidPtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = git_oid->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<git_oid>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_git_oid-E<gt>_to_ptr()>
+
+Converts an object of type C<git_oid> to an object of type C<git_oidPtr>.
+
+=item C<git_oid-E<gt>new()>
+
+Creates an empty object of type C<git_oid>. The corresponding packed
+string is zeroed out.
+
+=item C<id(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<git_oidPtr>.
+
+=back
+
+
+=head2 Object and class methods for C<git_index_time>/C<git_index_timePtr>
+
+The principal Perl representation of a C object of type C<git_index_time> is an
+object of class C<git_index_timePtr> which is a reference to an integer
+representation of a C pointer. To create such an object, one may use
+a combination
+
+ my $buffer = git_index_time->new();
+ my $obj = $buffer->_to_ptr();
+
+This exersizes the following two methods, and an additional class
+C<git_index_time>, the internal representation of which is a reference to a
+packed string with the C structure. Keep in mind that $buffer should
+better survive longer than $obj.
+
+=over
+
+=item C<$object_of_type_git_index_time-E<gt>_to_ptr()>
+
+Converts an object of type C<git_index_time> to an object of type C<git_index_timePtr>.
+
+=item C<git_index_time-E<gt>new()>
+
+Creates an empty object of type C<git_index_time>. The corresponding packed
+string is zeroed out.
+
+=item C<seconds(...)>, C<nanoseconds(...)>
+
+return the current value of the corresponding element if called
+without additional arguments. Set the element to the supplied value
+(and return the new value) if called with an additional argument.
+
+Applicable to objects of type C<git_index_timePtr>.
+
+=back
+
+
View
73 typemap.all
@@ -0,0 +1,73 @@
+Bytef * T_PV
+__fsid_t T_OPAQUE_STRUCT
+__fsid_t * T_PTROBJ
+alloc_func T_PTROBJ
+const char * T_PTROBJ
+fd_set T_OPAQUE_STRUCT
+fd_set * T_PTROBJ
+free_func T_PTROBJ
+git_index_entry T_OPAQUE_STRUCT
+git_index_entry * T_PTROBJ
+git_index_time T_OPAQUE_STRUCT
+git_index_time * T_PTROBJ
+git_off_t T_NV
+git_oid T_OPAQUE_STRUCT
+git_oid * T_PTROBJ
+git_oid_shorten * T_PTROBJ
+git_otype T_PTROBJ
+git_rawobj T_OPAQUE_STRUCT
+git_rawobj * T_PTROBJ
+git_signature T_OPAQUE_STRUCT
+git_signature * T_PTROBJ
+git_time T_OPAQUE_STRUCT
+git_time * T_PTROBJ
+git_time_t T_PTROBJ
+gz_header T_OPAQUE_STRUCT
+gz_header * T_PTROBJ
+long int T_PTROBJ
+pthread_attr_t T_OPAQUE_STRUCT
+pthread_attr_t * T_PTROBJ
+pthread_barrier_t T_OPAQUE_STRUCT
+pthread_barrier_t * T_PTROBJ
+pthread_barrierattr_t T_OPAQUE_STRUCT
+pthread_barrierattr_t * T_PTROBJ
+pthread_cond_t T_OPAQUE_STRUCT
+pthread_cond_t * T_PTROBJ
+pthread_condattr_t T_OPAQUE_STRUCT
+pthread_condattr_t * T_PTROBJ
+pthread_mutex_t T_OPAQUE_STRUCT
+pthread_mutex_t * T_PTROBJ
+pthread_mutexattr_t T_OPAQUE_STRUCT
+pthread_mutexattr_t * T_PTROBJ
+pthread_rwlock_t T_OPAQUE_STRUCT
+pthread_rwlock_t * T_PTROBJ
+pthread_rwlockattr_t T_OPAQUE_STRUCT
+pthread_rwlockattr_t * T_PTROBJ
+struct __pthread_internal_list * T_PTROBJ
+struct __pthread_mutex_s T_OPAQUE_STRUCT
+struct __pthread_mutex_s * T_PTROBJ
+struct internal_state * T_PTROBJ
+uInt T_UV
+uLong T_UV
+unsigned long int T_PTROBJ
+voidpf T_PTR
+z_stream T_OPAQUE_STRUCT
+z_stream * T_PTROBJ
+#############################################################################
+INPUT
+T_OPAQUE_STRUCT
+ if (sv_derived_from($arg, \"${ntype}\")) {
+ STRLEN len;
+ char *s = SvPV((SV*)SvRV($arg), len);
+
+ if (len != sizeof($var))
+ croak(\"Size %d of packed data != expected %d\",
+ len, sizeof($var));
+ $var = *($type *)s;
+ }
+ else
+ croak(\"$var is not of type ${ntype}\")
+#############################################################################
+OUTPUT
+T_OPAQUE_STRUCT
+ sv_setref_pvn($arg, \"${ntype}\", (char *)&$var, sizeof($var));

0 comments on commit a3ae72a

Please sign in to comment.
Something went wrong with that request. Please try again.