libxslt-ruby 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -42,7 +42,7 @@ default_spec = Gem::Specification.new do |spec|
42
42
 
43
43
  spec.author = "Charlie Savage"
44
44
  spec.email = "libxml-devel@rubyforge.org"
45
- spec.add_dependency('libxml-ruby','>=0.9.0')
45
+ spec.add_dependency('libxml-ruby','>=0.9.4')
46
46
  spec.platform = Gem::Platform::RUBY
47
47
  spec.require_paths = ["lib", "ext/libxslt"]
48
48
 
@@ -60,7 +60,6 @@ Init_libxslt_ruby(void) {
60
60
  eXSLTError = rb_define_class_under(cLibXSLT, "XSLTError", rb_eRuntimeError);
61
61
 
62
62
  ruby_init_xslt_stylesheet();
63
- ruby_init_xslt_transform_context();
64
63
 
65
64
  /* Now load exslt. */
66
65
  exsltRegisterAll();
@@ -17,7 +17,6 @@
17
17
  #include <libexslt/exslt.h>
18
18
 
19
19
  #include "ruby_xslt_stylesheet.h"
20
- #include "ruby_xslt_transform_context.h"
21
20
 
22
21
  #include "version.h"
23
22
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  VALUE cXSLTStylesheet;
18
18
 
19
- VALUE
19
+ static VALUE
20
20
  ruby_xslt_stylesheet_document_klass() {
21
21
  VALUE mXML = rb_const_get(rb_cObject, rb_intern("XML"));
22
22
  return rb_const_get(mXML, rb_intern("Document"));
@@ -24,11 +24,10 @@ ruby_xslt_stylesheet_document_klass() {
24
24
 
25
25
  void
26
26
  ruby_xslt_stylesheet_free(xsltStylesheetPtr xstylesheet) {
27
-
28
27
  xsltFreeStylesheet(xstylesheet);
29
28
  }
30
29
 
31
- VALUE
30
+ static VALUE
32
31
  ruby_xslt_stylesheet_alloc(VALUE klass) {
33
32
  return Data_Wrap_Struct(cXSLTStylesheet,
34
33
  NULL, ruby_xslt_stylesheet_free,
@@ -48,7 +47,7 @@ ruby_xslt_stylesheet_alloc(VALUE klass) {
48
47
  * stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
49
48
  *
50
49
  */
51
- VALUE
50
+ static VALUE
52
51
  ruby_xslt_stylesheet_initialize(VALUE self, VALUE document) {
53
52
  xmlDocPtr xdoc;
54
53
  xmlDocPtr xcopy;
@@ -120,7 +119,7 @@ ruby_xslt_coerce_params(VALUE params) {
120
119
  * result = stylesheet.apply(xml_doc)
121
120
  * result = stylesheet.apply(xml_doc, {:foo => 'bar'})
122
121
  */
123
- VALUE
122
+ static VALUE
124
123
  ruby_xslt_stylesheet_apply(int argc, VALUE *argv, VALUE self) {
125
124
  xmlDocPtr xdoc;
126
125
  xsltStylesheetPtr xstylesheet;
@@ -160,7 +159,7 @@ ruby_xslt_stylesheet_apply(int argc, VALUE *argv, VALUE self) {
160
159
  }
161
160
  ruby_xfree(pParams);
162
161
 
163
- return ruby_xml_document_wrap(result);
162
+ return rxml_document_wrap(result);
164
163
  }
165
164
 
166
165
 
@@ -179,7 +178,7 @@ ruby_xslt_stylesheet_debug(int argc, VALUE *argv, VALUE self) {
179
178
  OpenFile *fptr;
180
179
  VALUE io;
181
180
  FILE *out;
182
- ruby_xml_document_t *parsed;
181
+ rxml_document_t *parsed;
183
182
  ruby_xslt_stylesheet *xss;
184
183
 
185
184
  Data_Get_Struct(self, ruby_xslt_stylesheet, xss);
@@ -199,7 +198,7 @@ ruby_xslt_stylesheet_debug(int argc, VALUE *argv, VALUE self) {
199
198
  rb_raise(rb_eArgError, "wrong number of arguments (0 or 1)");
200
199
  }
201
200
 
202
- Data_Get_Struct(xss->parsed, ruby_xml_document_t, parsed);
201
+ Data_Get_Struct(xss->parsed, rxml_document_t, parsed);
203
202
  if (parsed->doc == NULL)
204
203
  return(Qnil);
205
204
 
@@ -230,7 +229,7 @@ ruby_xslt_stylesheet_print(int argc, VALUE *argv, VALUE self) {
230
229
  OpenFile *fptr;
231
230
  VALUE io;
232
231
  FILE *out;
233
- ruby_xml_document_t *parsed;
232
+ rxml_document_t *parsed;
234
233
  ruby_xslt_stylesheet *xss;
235
234
  int bytes;
236
235
 
@@ -251,7 +250,7 @@ ruby_xslt_stylesheet_print(int argc, VALUE *argv, VALUE self) {
251
250
  rb_raise(rb_eArgError, "wrong number of arguments (0 or 1)");
252
251
  }
253
252
 
254
- Data_Get_Struct(xss->parsed, ruby_xml_document_t, parsed);
253
+ Data_Get_Struct(xss->parsed, rxml_document_t, parsed);
255
254
  if (parsed->doc == NULL)
256
255
  return(Qnil);
257
256
 
@@ -1,5 +1,5 @@
1
- #define RUBY_LIBXSLT_VERSION "0.9.0"
1
+ #define RUBY_LIBXSLT_VERSION "0.9.1"
2
2
  #define RUBY_LIBXSLT_VERNUM 0
3
3
  #define RUBY_LIBXSLT_VER_MAJ 0
4
4
  #define RUBY_LIBXSLT_VER_MIN 9
5
- #define RUBY_LIBXSLT_VER_MIC 0
5
+ #define RUBY_LIBXSLT_VER_MIC 1
@@ -63,7 +63,7 @@
63
63
  <Tool
64
64
  Name="VCLinkerTool"
65
65
  AdditionalDependencies="msvcrt-ruby18.lib libxml2.lib libxslt.lib libexslt.lib"
66
- OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxslt-ruby-0.8.3-x86-mswin32-60\lib\$(ProjectName).so"
66
+ OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxslt-ruby-0.9.1-x86-mswin32-60\lib\$(ProjectName).so"
67
67
  LinkIncremental="2"
68
68
  AdditionalLibraryDirectories="C:\Development\ruby\lib;C:\Development\msys\local\lib"
69
69
  GenerateDebugInformation="true"
@@ -193,10 +193,6 @@
193
193
  RelativePath="..\libxslt\ruby_xslt_stylesheet.c"
194
194
  >
195
195
  </File>
196
- <File
197
- RelativePath="..\libxslt\ruby_xslt_transform_context.c"
198
- >
199
- </File>
200
196
  </Filter>
201
197
  <Filter
202
198
  Name="Header Files"
@@ -211,10 +207,6 @@
211
207
  RelativePath="..\libxslt\ruby_xslt_stylesheet.h"
212
208
  >
213
209
  </File>
214
- <File
215
- RelativePath="..\libxslt\ruby_xslt_transform_context.h"
216
- >
217
- </File>
218
210
  <File
219
211
  RelativePath="..\libxslt\version.h"
220
212
  >
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libxslt-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Savage
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-18 00:00:00 -07:00
12
+ date: 2008-11-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.0
23
+ version: 0.9.4
24
24
  version:
25
25
  description: The Libxslt-Ruby project provides Ruby language bindings for the GNOME XSLT C library. It is free software, released under the MIT License.
26
26
  email: libxml-devel@rubyforge.org
@@ -41,11 +41,9 @@ files:
41
41
  - lib/xslt.rb
42
42
  - ext/libxslt/libxslt.h
43
43
  - ext/libxslt/ruby_xslt_stylesheet.h
44
- - ext/libxslt/ruby_xslt_transform_context.h
45
44
  - ext/libxslt/version.h
46
45
  - ext/libxslt/libxslt.c
47
46
  - ext/libxslt/ruby_xslt_stylesheet.c
48
- - ext/libxslt/ruby_xslt_transform_context.c
49
47
  - ext/mingw/Rakefile
50
48
  - ext/vc/libxslt_ruby.sln
51
49
  - ext/vc/libxslt_ruby.vcproj
@@ -83,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
81
  requirements: []
84
82
 
85
83
  rubyforge_project: libxslt-ruby
86
- rubygems_version: 1.2.0
84
+ rubygems_version: 1.3.1
87
85
  signing_key:
88
86
  specification_version: 2
89
87
  summary: Ruby libxslt bindings
@@ -1,64 +0,0 @@
1
- /* $Id: ruby_xslt_transform_context.c 42 2007-12-07 06:09:35Z transami $ */
2
-
3
- /* Please see the LICENSE file for copyright and distribution information */
4
-
5
- #include "libxslt.h"
6
- #include "ruby_xslt_transform_context.h"
7
-
8
-
9
- /* :nodoc: */
10
-
11
- VALUE cXSLTTransformContext;
12
-
13
- void
14
- ruby_xslt_transform_context_free(ruby_xslt_transform_context *rxtc) {
15
- if (rxtc->ctxt != NULL) {
16
- xsltFreeTransformContext(rxtc->ctxt);
17
- rxtc->ctxt = NULL;
18
- }
19
- ruby_xfree(rxtc);
20
- }
21
-
22
- void
23
- ruby_xslt_transform_context_mark(ruby_xslt_transform_context *rxtc) {
24
- if (rxtc == NULL) return;
25
- if (!NIL_P(rxtc->xslt)) rb_gc_mark(rxtc->xslt);
26
- }
27
-
28
-
29
- VALUE
30
- ruby_xslt_transform_context_new(VALUE class, VALUE xslt,
31
- xsltTransformContextPtr ctxt) {
32
- ruby_xslt_transform_context *rxtc;
33
- rxtc = ALLOC(ruby_xslt_transform_context);
34
- rxtc->ctxt = ctxt;
35
- rxtc->xslt = xslt;
36
- //fprintf(stderr,"ruby_xslt_transform_context_new 2\n");
37
- //if (class == Qfalse)
38
- //fprintf(stderr,"ruby_xslt_transform_context_new: EEEEK!\n");
39
- return(Data_Wrap_Struct(class, ruby_xslt_transform_context_mark,
40
- ruby_xslt_transform_context_free, rxtc));
41
- }
42
-
43
-
44
- VALUE
45
- ruby_xslt_transform_context_new2(VALUE class, VALUE xslt) {
46
- return(ruby_xslt_transform_context_new(class, xslt, NULL));
47
- }
48
-
49
-
50
- VALUE
51
- ruby_xslt_transform_context_new3(VALUE xslt) {
52
- return(ruby_xslt_transform_context_new2(cXSLTTransformContext, xslt));
53
- }
54
-
55
- #ifdef RDOC_NEVER_DEFINED
56
- cLibXSLT = rb_define_module("LibXSLT");
57
- cXSLT = rb_define_module_under(cLibXSLT, "XSLT");
58
- #endif
59
-
60
- void
61
- ruby_init_xslt_transform_context(void) {
62
- cXSLTTransformContext =
63
- rb_define_class_under(cXSLT, "TransformContext", rb_cObject);
64
- }
@@ -1,22 +0,0 @@
1
- /* $Id: ruby_xslt_transform_context.h 42 2007-12-07 06:09:35Z transami $ */
2
-
3
- /* Please see the LICENSE file for copyright and distribution information */
4
-
5
- #ifndef __RUBY_XSLT_TRANSFORM_CONTEXT__
6
- #define __RUBY_XSLT_TRANSFORM_CONTEXT__
7
-
8
- extern VALUE cXSLTTransformContext;
9
-
10
- typedef struct ruby_xslt_transform_context {
11
- xsltTransformContextPtr ctxt;
12
- VALUE xslt;
13
- } ruby_xslt_transform_context;
14
-
15
- void ruby_init_xslt_transform_context(void);
16
- void ruby_xslt_transform_context_free(ruby_xslt_transform_context *ctxt);
17
- void ruby_xslt_transform_context_mark(ruby_xslt_transform_context *ctxt);
18
- VALUE ruby_xslt_transform_context_new(VALUE class, VALUE xslt, xsltTransformContextPtr ctxt);
19
- VALUE ruby_xslt_transform_context_new2(VALUE class, VALUE xslt);
20
- VALUE ruby_xslt_transform_context_new3(VALUE xslt);
21
-
22
- #endif