ffi 1.0.4-x86-mingw32 → 1.0.5-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ffi might be problematic. Click here for more details.

Files changed (63) hide show
  1. data/Rakefile +2 -2
  2. data/ext/ffi_c/AbstractMemory.c +1 -1
  3. data/ext/ffi_c/ArrayType.c +11 -19
  4. data/ext/ffi_c/ArrayType.h +11 -19
  5. data/ext/ffi_c/Buffer.c +2 -0
  6. data/ext/ffi_c/Call.h +12 -19
  7. data/ext/ffi_c/ClosurePool.h +19 -0
  8. data/ext/ffi_c/DynamicLibrary.h +18 -0
  9. data/ext/ffi_c/Function.c +12 -13
  10. data/ext/ffi_c/Function.h +12 -19
  11. data/ext/ffi_c/LastError.c +12 -19
  12. data/ext/ffi_c/LastError.h +20 -0
  13. data/ext/ffi_c/MappedType.c +12 -19
  14. data/ext/ffi_c/MappedType.h +12 -19
  15. data/ext/ffi_c/MemoryPointer.c +1 -0
  16. data/ext/ffi_c/MemoryPointer.h +23 -3
  17. data/ext/ffi_c/MethodHandle.h +15 -22
  18. data/ext/ffi_c/Platform.c +36 -9
  19. data/ext/ffi_c/Platform.h +23 -3
  20. data/ext/ffi_c/Pointer.c +2 -0
  21. data/ext/ffi_c/Pointer.h +11 -19
  22. data/ext/ffi_c/Struct.c +12 -19
  23. data/ext/ffi_c/Struct.h +11 -19
  24. data/ext/ffi_c/StructByValue.c +13 -19
  25. data/ext/ffi_c/StructByValue.h +12 -19
  26. data/ext/ffi_c/StructLayout.c +12 -19
  27. data/ext/ffi_c/Thread.c +36 -10
  28. data/ext/ffi_c/Thread.h +14 -5
  29. data/ext/ffi_c/Type.c +1 -0
  30. data/ext/ffi_c/Types.c +12 -19
  31. data/ext/ffi_c/Types.h +11 -19
  32. data/ext/ffi_c/Variadic.c +1 -1
  33. data/ext/ffi_c/compat.h +13 -19
  34. data/ext/ffi_c/endian.h +1 -0
  35. data/ext/ffi_c/extconf.rb +3 -1
  36. data/ext/ffi_c/ffi.c +12 -19
  37. data/ext/ffi_c/rbffi.h +23 -3
  38. data/lib/1.8/ffi_c.so +0 -0
  39. data/lib/1.9/ffi_c.so +0 -0
  40. data/lib/ffi/tools/const_generator.rb +1 -1
  41. data/spec/ffi/async_callback_spec.rb +35 -12
  42. data/spec/ffi/bool_spec.rb +16 -0
  43. data/spec/ffi/buffer_spec.rb +34 -21
  44. data/spec/ffi/callback_spec.rb +16 -0
  45. data/spec/ffi/custom_param_type.rb +16 -0
  46. data/spec/ffi/custom_type_spec.rb +16 -0
  47. data/spec/ffi/enum_spec.rb +16 -0
  48. data/spec/ffi/errno_spec.rb +16 -0
  49. data/spec/ffi/ffi_spec.rb +16 -0
  50. data/spec/ffi/library_spec.rb +16 -0
  51. data/spec/ffi/managed_struct_spec.rb +16 -0
  52. data/spec/ffi/number_spec.rb +16 -0
  53. data/spec/ffi/strptr_spec.rb +16 -0
  54. data/spec/ffi/struct_callback_spec.rb +16 -0
  55. data/spec/ffi/struct_initialize_spec.rb +1 -0
  56. data/spec/ffi/struct_packed_spec.rb +16 -0
  57. data/spec/ffi/struct_spec.rb +16 -0
  58. data/spec/ffi/typedef_spec.rb +16 -0
  59. data/spec/ffi/union_spec.rb +16 -0
  60. data/spec/ffi/variadic_spec.rb +16 -0
  61. data/tasks/extension.rake +1 -1
  62. metadata +11 -24
  63. data/lib/ffi_c.so +0 -0
@@ -155,3 +155,4 @@ rbffi_MemoryPointer_Init(VALUE moduleFFI)
155
155
  rb_define_method(rbffi_MemoryPointerClass, "autorelease=", memptr_autorelease, 1);
156
156
  rb_define_method(rbffi_MemoryPointerClass, "free", memptr_free, 0);
157
157
  }
158
+
@@ -1,6 +1,26 @@
1
+ /*
2
+ * Copyright (c) 2008, 2009, Wayne Meissner
3
+ * Copyright (c) 2008, Luc Heinrich <luc@honk-honk.com>
4
+ *
5
+ * All rights reserved.
6
+ *
7
+ * This file is part of ruby-ffi.
8
+ *
9
+ * This code is free software: you can redistribute it and/or modify it under
10
+ * the terms of the GNU Lesser General Public License version 3 only, as
11
+ * published by the Free Software Foundation.
12
+ *
13
+ * This code is distributed in the hope that it will be useful, but WITHOUT
14
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16
+ * version 3 for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
20
+ */
1
21
 
2
- #ifndef _MEMORYPOINTER_H
3
- #define _MEMORYPOINTER_H
22
+ #ifndef RBFFI_MEMORYPOINTER_H
23
+ #define RBFFI_MEMORYPOINTER_H
4
24
 
5
25
  #include <stdbool.h>
6
26
  #include <ruby.h>
@@ -16,5 +36,5 @@ extern "C" {
16
36
  }
17
37
  #endif
18
38
 
19
- #endif /* _MEMORYPOINTER_H */
39
+ #endif /* RBFFI_MEMORYPOINTER_H */
20
40
 
@@ -1,32 +1,25 @@
1
1
  /*
2
2
  * Copyright (c) 2009, Wayne Meissner
3
+ *
3
4
  * All rights reserved.
4
5
  *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions are met:
6
+ * This file is part of ruby-ffi.
7
+ *
8
+ * This code is free software: you can redistribute it and/or modify it under
9
+ * the terms of the GNU Lesser General Public License version 3 only, as
10
+ * published by the Free Software Foundation.
7
11
  *
8
- * * Redistributions of source code must retain the above copyright notice, this
9
- * list of conditions and the following disclaimer.
10
- * * Redistributions in binary form must reproduce the above copyright notice
11
- * this list of conditions and the following disclaimer in the documentation
12
- * and/or other materials provided with the distribution.
13
- * * The name of the author or authors may not be used to endorse or promote
14
- * products derived from this software without specific prior written permission.
12
+ * This code is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15
+ * version 3 for more details.
15
16
  *
16
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
26
19
  */
27
20
 
28
- #ifndef _METHODHANDLE_H
29
- #define _METHODHANDLE_H
21
+ #ifndef RBFFI_METHODHANDLE_H
22
+ #define RBFFI_METHODHANDLE_H
30
23
 
31
24
  #ifdef __cplusplus
32
25
  extern "C" {
@@ -49,5 +42,5 @@ void rbffi_MethodHandle_Init(VALUE module);
49
42
  }
50
43
  #endif
51
44
 
52
- #endif /* _METHODHANDLE_H */
45
+ #endif /* RBFFI_METHODHANDLE_H */
53
46
 
@@ -1,3 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2008-2010 Wayne Meissner
3
+ *
4
+ * All rights reserved.
5
+ *
6
+ * This file is part of ruby-ffi.
7
+ *
8
+ * This code is free software: you can redistribute it and/or modify it under
9
+ * the terms of the GNU Lesser General Public License version 3 only, as
10
+ * published by the Free Software Foundation.
11
+ *
12
+ * This code is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15
+ * version 3 for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
1
21
  #include <sys/param.h>
2
22
  #include <sys/types.h>
3
23
  #include <stdint.h>
@@ -15,19 +35,25 @@ static VALUE PlatformModule = Qnil;
15
35
  * on intel.
16
36
  */
17
37
  #ifdef __i386__
18
- #define CPU "i386"
38
+ # define CPU "i386"
39
+
19
40
  #elif defined(__ppc__) || defined(__powerpc__)
20
- #define CPU "powerpc"
41
+ # define CPU "powerpc"
42
+
21
43
  #elif defined(__x86_64__)
22
- #define CPU "x86_64"
23
- #elif defined(__sparc__)
24
- #define CPU "sparc"
25
- #elif defined(__sparcv9__)
26
- #define CPU "sparcv9"
44
+ # define CPU "x86_64"
45
+
46
+ /* Need to check for __sparcv9 first, because __sparc will be defined either way. */
47
+ #elif defined(__sparcv9__) || defined(__sparcv9)
48
+ # define CPU "sparcv9"
49
+
50
+ #elif defined(__sparc__) || defined(__sparc)
51
+ # define CPU "sparc"
52
+
27
53
  #elif defined(__arm__)
28
- #define CPU "arm"
54
+ # define CPU "arm"
29
55
  #else
30
- #error "Unknown cpu type"
56
+ # error "Unknown cpu type"
31
57
  #endif
32
58
 
33
59
  static void
@@ -59,3 +85,4 @@ rbffi_Platform_Init(VALUE moduleFFI)
59
85
  rb_define_const(PlatformModule, "CPU", rb_str_new2(CPU));
60
86
  export_primitive_types(PlatformModule);
61
87
  }
88
+
@@ -1,5 +1,25 @@
1
- #ifndef _PLATFORM_H
2
- #define _PLATFORM_H
1
+ /*
2
+ * Copyright (c) 2008-2010 Wayne Meissner
3
+ *
4
+ * All rights reserved.
5
+ *
6
+ * This file is part of ruby-ffi.
7
+ *
8
+ * This code is free software: you can redistribute it and/or modify it under
9
+ * the terms of the GNU Lesser General Public License version 3 only, as
10
+ * published by the Free Software Foundation.
11
+ *
12
+ * This code is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15
+ * version 3 for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #ifndef RBFFI_PLATFORM_H
22
+ #define RBFFI_PLATFORM_H
3
23
 
4
24
  #ifdef __cplusplus
5
25
  extern "C" {
@@ -12,5 +32,5 @@ extern "C" {
12
32
  }
13
33
  #endif
14
34
 
15
- #endif /* _PLATFORM_H */
35
+ #endif /* RBFFI_PLATFORM_H */
16
36
 
@@ -23,6 +23,7 @@
23
23
  #include <limits.h>
24
24
  #include <ruby.h>
25
25
  #include "rbffi.h"
26
+ #include "endian.h"
26
27
  #include "AbstractMemory.h"
27
28
  #include "Pointer.h"
28
29
 
@@ -280,3 +281,4 @@ rbffi_Pointer_Init(VALUE moduleFFI)
280
281
  rbffi_NullPointerSingleton = rb_class_new_instance(1, &rbNullAddress, rbffi_PointerClass);
281
282
  rb_define_const(rbffi_PointerClass, "NULL", rbffi_NullPointerSingleton);
282
283
  }
284
+
@@ -3,27 +3,19 @@
3
3
  *
4
4
  * All rights reserved.
5
5
  *
6
- * Redistribution and use in source and binary forms, with or without
7
- * modification, are permitted provided that the following conditions are met:
6
+ * This file is part of ruby-ffi.
8
7
  *
9
- * * Redistributions of source code must retain the above copyright notice, this
10
- * list of conditions and the following disclaimer.
11
- * * Redistributions in binary form must reproduce the above copyright notice
12
- * this list of conditions and the following disclaimer in the documentation
13
- * and/or other materials provided with the distribution.
14
- * * The name of the author or authors may not be used to endorse or promote
15
- * products derived from this software without specific prior written permission.
8
+ * This code is free software: you can redistribute it and/or modify it under
9
+ * the terms of the GNU Lesser General Public License version 3 only, as
10
+ * published by the Free Software Foundation.
16
11
  *
17
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
21
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12
+ * This code is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15
+ * version 3 for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
27
19
  */
28
20
 
29
21
  #ifndef RBFFI_POINTER_H
@@ -4,27 +4,19 @@
4
4
  *
5
5
  * All rights reserved.
6
6
  *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
7
+ * This file is part of ruby-ffi.
9
8
  *
10
- * * Redistributions of source code must retain the above copyright notice, this
11
- * list of conditions and the following disclaimer.
12
- * * Redistributions in binary form must reproduce the above copyright notice
13
- * this list of conditions and the following disclaimer in the documentation
14
- * and/or other materials provided with the distribution.
15
- * * The name of the author or authors may not be used to endorse or promote
16
- * products derived from this software without specific prior written permission.
9
+ * This code is free software: you can redistribute it and/or modify it under
10
+ * the terms of the GNU Lesser General Public License version 3 only, as
11
+ * published by the Free Software Foundation.
17
12
  *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13
+ * This code is distributed in the hope that it will be useful, but WITHOUT
14
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16
+ * version 3 for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
28
20
  */
29
21
 
30
22
  #include <sys/types.h>
@@ -629,3 +621,4 @@ rbffi_Struct_Init(VALUE moduleFFI)
629
621
  id_to_ptr = rb_intern("to_ptr");
630
622
  id_to_s = rb_intern("to_s");
631
623
  }
624
+
@@ -4,27 +4,19 @@
4
4
  *
5
5
  * All rights reserved.
6
6
  *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
7
+ * This file is part of ruby-ffi.
9
8
  *
10
- * * Redistributions of source code must retain the above copyright notice, this
11
- * list of conditions and the following disclaimer.
12
- * * Redistributions in binary form must reproduce the above copyright notice
13
- * this list of conditions and the following disclaimer in the documentation
14
- * and/or other materials provided with the distribution.
15
- * * The name of the author or authors may not be used to endorse or promote
16
- * products derived from this software without specific prior written permission.
9
+ * This code is free software: you can redistribute it and/or modify it under
10
+ * the terms of the GNU Lesser General Public License version 3 only, as
11
+ * published by the Free Software Foundation.
17
12
  *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13
+ * This code is distributed in the hope that it will be useful, but WITHOUT
14
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16
+ * version 3 for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
28
20
  */
29
21
 
30
22
  #ifndef RBFFI_STRUCT_H
@@ -1,28 +1,21 @@
1
1
  /*
2
2
  * Copyright (c) 2009, Wayne Meissner
3
+ *
3
4
  * All rights reserved.
4
5
  *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions are met:
6
+ * This file is part of ruby-ffi.
7
+ *
8
+ * This code is free software: you can redistribute it and/or modify it under
9
+ * the terms of the GNU Lesser General Public License version 3 only, as
10
+ * published by the Free Software Foundation.
7
11
  *
8
- * * Redistributions of source code must retain the above copyright notice, this
9
- * list of conditions and the following disclaimer.
10
- * * Redistributions in binary form must reproduce the above copyright notice
11
- * this list of conditions and the following disclaimer in the documentation
12
- * and/or other materials provided with the distribution.
13
- * * The name of the author or authors may not be used to endorse or promote
14
- * products derived from this software without specific prior written permission.
12
+ * This code is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15
+ * version 3 for more details.
15
16
  *
16
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
26
19
  */
27
20
 
28
21
  #include <sys/param.h>
@@ -138,3 +131,4 @@ rbffi_StructByValue_Init(VALUE moduleFFI)
138
131
  rb_define_method(rbffi_StructByValueClass, "layout", sbv_layout, 0);
139
132
  rb_define_method(rbffi_StructByValueClass, "struct_class", sbv_struct_class, 0);
140
133
  }
134
+
@@ -1,28 +1,21 @@
1
1
  /*
2
2
  * Copyright (c) 2009, Wayne Meissner
3
+ *
3
4
  * All rights reserved.
4
5
  *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions are met:
6
+ * This file is part of ruby-ffi.
7
+ *
8
+ * This code is free software: you can redistribute it and/or modify it under
9
+ * the terms of the GNU Lesser General Public License version 3 only, as
10
+ * published by the Free Software Foundation.
7
11
  *
8
- * * Redistributions of source code must retain the above copyright notice, this
9
- * list of conditions and the following disclaimer.
10
- * * Redistributions in binary form must reproduce the above copyright notice
11
- * this list of conditions and the following disclaimer in the documentation
12
- * and/or other materials provided with the distribution.
13
- * * The name of the author or authors may not be used to endorse or promote
14
- * products derived from this software without specific prior written permission.
12
+ * This code is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15
+ * version 3 for more details.
15
16
  *
16
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
26
19
  */
27
20
 
28
21
  #ifndef RBFFI_STRUCTBYVALUE_H
@@ -4,27 +4,19 @@
4
4
  *
5
5
  * All rights reserved.
6
6
  *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
7
+ * This file is part of ruby-ffi.
9
8
  *
10
- * * Redistributions of source code must retain the above copyright notice, this
11
- * list of conditions and the following disclaimer.
12
- * * Redistributions in binary form must reproduce the above copyright notice
13
- * this list of conditions and the following disclaimer in the documentation
14
- * and/or other materials provided with the distribution.
15
- * * The name of the author or authors may not be used to endorse or promote
16
- * products derived from this software without specific prior written permission.
9
+ * This code is free software: you can redistribute it and/or modify it under
10
+ * the terms of the GNU Lesser General Public License version 3 only, as
11
+ * published by the Free Software Foundation.
17
12
  *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13
+ * This code is distributed in the hope that it will be useful, but WITHOUT
14
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16
+ * version 3 for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
28
20
  */
29
21
 
30
22
  #include <sys/types.h>
@@ -496,3 +488,4 @@ rbffi_StructLayout_Init(VALUE moduleFFI)
496
488
  rb_define_method(rbffi_StructLayoutClass, "to_a", struct_layout_to_a, 0);
497
489
 
498
490
  }
491
+