[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libextractor-perl] 05/08: address@hidden: rafl | 2005-11-1
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libextractor-perl] 05/08: address@hidden: rafl | 2005-11-13 13:30:32 +0100 * Added an init method which is called after object construction to initialize the extractor_list value in the object hash. * Adjusted loadDefaultLibraries() to reflect the changes above. |
Date: |
Sat, 13 Apr 2019 13:48:35 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository libextractor-perl.
commit 5abde7af8f55660bccbae492cdc4a4964fe193e8
Author: Florian Ragwitz <address@hidden>
AuthorDate: Sun Nov 13 12:11:45 2005 +0000
address@hidden: rafl | 2005-11-13 13:30:32 +0100
* Added an init method which is called after object construction to
initialize
the extractor_list value in the object hash.
* Adjusted loadDefaultLibraries() to reflect the changes above.
---
pm/Extract.pm | 1 +
xs/Extract.xs | 25 ++++++++++++++++++-------
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/pm/Extract.pm b/pm/Extract.pm
index ef49254..71cba6b 100644
--- a/pm/Extract.pm
+++ b/pm/Extract.pm
@@ -16,6 +16,7 @@ sub new {
$class = ref $class || $class;
my $self = {};
bless $self, $class;
+ $self->init();
return $self;
}
diff --git a/xs/Extract.xs b/xs/Extract.xs
index 11a5ab1..99cd1d0 100644
--- a/xs/Extract.xs
+++ b/xs/Extract.xs
@@ -2,19 +2,30 @@
MODULE = File::Extract PACKAGE = File::Extract PREFIX = EXTRACTOR_
-SV*
-EXTRACTOR_loadDefaultLibraries(extractor)
+void
+init(extractor)
SV* extractor
PREINIT:
HV* hv;
- CODE:
- RETVAL =
newSvEXTRACTOR_ExtractorList_ornull(EXTRACTOR_loadDefaultLibraries());
+ SV* list = NULL;
+ PPCODE:
+ list = newSvEXTRACTOR_ExtractorList_ornull(NULL);
hv = pextract_get_hv_from_file_extract_obj(extractor);
if (hv) {
- SvREFCNT_inc(RETVAL);
- hv_store(hv, "extractor_list", 14, RETVAL, 0);
- } else
+ SvREFCNT_inc(list);
+ hv_store(hv, "extractor_list", 14, list, 0);
+ } else {
croak("foo");
+ }
+
+SV*
+EXTRACTOR_loadDefaultLibraries(extractor)
+ SV* extractor
+ PREINIT:
+ EXTRACTOR_ExtractorList* list = NULL;
+ CODE:
+ list =
SvEXTRACTOR_ExtractorList_ornull(pextract_get_extractor_list(extractor));
+ RETVAL =
newSvEXTRACTOR_ExtractorList_ornull(EXTRACTOR_loadDefaultLibraries());
OUTPUT:
RETVAL
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [libextractor-perl] branch master created (now 18437ed), gnunet, 2019/04/13
- [GNUnet-SVN] [libextractor-perl] 01/08: i, gnunet, 2019/04/13
- [GNUnet-SVN] [libextractor-perl] 04/08: address@hidden: rafl | 2005-11-13 13:15:52 +0100 * Move typemap to xs/., gnunet, 2019/04/13
- [GNUnet-SVN] [libextractor-perl] 05/08: address@hidden: rafl | 2005-11-13 13:30:32 +0100 * Added an init method which is called after object construction to initialize the extractor_list value in the object hash. * Adjusted loadDefaultLibraries() to reflect the changes above.,
gnunet <=
- [GNUnet-SVN] [libextractor-perl] 07/08: address@hidden: rafl | 2005-11-13 22:51:22 +0100 * Fixed a segfault, gnunet, 2019/04/13
- [GNUnet-SVN] [libextractor-perl] 06/08: address@hidden: rafl | 2005-11-13 21:43:23 +0100 * Fixed some leaks, cleaned up a bit. * Functions that modify an extractor list don't have a return value anymore because they do this by reference, not by value., gnunet, 2019/04/13
- [GNUnet-SVN] [libextractor-perl] 02/08: sync, gnunet, 2019/04/13
- [GNUnet-SVN] [libextractor-perl] 03/08: address@hidden: rafl | 2005-11-13 12:46:00 +0100 * Moved everything in the right directory again. * Removed copying. I'm not sure about the license yet. I think I'll chose Artistic + GPL., gnunet, 2019/04/13
- [GNUnet-SVN] [libextractor-perl] 08/08: update readmes, gnunet, 2019/04/13