diff --git a/README.md b/README.md index d08f8cda..c181e691 100644 --- a/README.md +++ b/README.md @@ -457,7 +457,7 @@ my $function = $ffi->function( $name => \@fixed_argument_types => \@var_argument my $function = $ffi->function( $name => \@fixed_argument_types => \@var_argument_types => \&wrapper); ``` -Version 0.91 and later allows you to creat functions for c variadic functions +Version 0.91 and later allows you to create functions for c variadic functions (such as printf, scanf, etc) which can take a variable number of arguments. The first set of arguments are the fixed set, the second set are the variable arguments to bind with. The variable argument types must be specified in order @@ -688,7 +688,7 @@ my $unittype = $ffi->unitof($type); ``` For array and pointer types, returns the basic type without the array or pointer part. -In other words, for `sin16[]` or `sint16*` it will return `sint16`. +In other words, for `sint16[]` or `sint16*` it will return `sint16`. ## find\_lib @@ -1814,7 +1814,7 @@ use FFI::Platypus 2.00; use FFI::CheckLib qw( find_lib_or_die ); # This example uses FreeBSD's libarchive to list the contents of any -# archive format that it suppors. We've also filled out a part of +# archive format that it supports. We've also filled out a part of # the ArchiveWrite class that could be used for writing archive formats # supported by libarchive @@ -1962,7 +1962,7 @@ $ffi->attach( [ free => 'DESTROY' ] => ['archive_t'] ); The `libarchive` is a large library with hundreds of methods. For comprehensive FFI bindings for `libarchive` see [Archive::Libarchive](https://metacpan.org/pod/Archive::Libarchive). -## unix open +## UNIX open ### C API @@ -2028,7 +2028,7 @@ of `opaque` (the latter being the default for the `object` type). Mainly just for demonstration since Perl has much better IO libraries, but now we have an OO interface to the Unix IO functions. -## Varadic Functions (with libcurl) +## Variadic Functions (with libcurl) ### C API @@ -2077,15 +2077,15 @@ $ perl curl.pl ### Discussion -The [libcurl](https://curl.se/) library makes extensive use of "varadic" functions. +The [libcurl](https://curl.se/) library makes extensive use of "variadic" functions. -The C programming language and ABI have the concept of "varadic" functions +The C programming language and ABI have the concept of "variadic" functions that can take a variable number and variable type of arguments. Assuming you have a `libffi` that supports it (and most modern systems should), -then you can create bindings to a varadic function by providing two sets -of array references, one for the fixed arguments (for reasons, C varadic +then you can create bindings to a variadic function by providing two sets +of array references, one for the fixed arguments (for reasons, C variadic functions must have at least one) and one for variable arguments. In -this example we call `curl_easy_setopt` as a varadic function. +this example we call `curl_easy_setopt` as a variadic function. For functions that have a large or infinite number of possible signatures it may be impracticable or impossible to attach them all. You can instead @@ -2167,7 +2167,7 @@ argument types and the return type. Inside the closure or callback we use the [window function](https://metacpan.org/pod/FFI::Platypus::Buffer#window) from [FFI::Platypus::Buffer](https://metacpan.org/pod/FFI::Platypus::Buffer) again to avoid an _extra_ copy. We still -have to copy the buffer to append it to `$hmtl` but it is at least one +have to copy the buffer to append it to `$html` but it is at least one less copy. ## bundle your own code @@ -2385,7 +2385,7 @@ in writing interfaces that use enums. ## Memory leaks There are a couple places where memory is allocated, but never deallocated that may -look like memory leaks by tools designed to find memory leaks like valgrind. This +look like memory leaks by tools designed to find memory leaks like Valgrind. This memory is intended to be used for the lifetime of the perl process so there normally this isn't a problem unless you are embedding a Perl interpreter which doesn't closely match the lifetime of your overall application. @@ -2407,7 +2407,7 @@ for use cases where Perl and Platypus are embedded in a larger application where the lifetime of the Perl process is significantly smaller than the overall lifetime of the whole process. -## I get seg faults on some platforms but not others with a library using pthreads. +## I get segfaults on some platforms but not others with a library using pthreads. On some platforms, Perl isn't linked with `libpthreads` if Perl threads are not enabled. On some platforms this doesn't seem to matter, `libpthreads` can be @@ -2463,7 +2463,7 @@ written it yet. # SUPPORT The intent of the `FFI-Platypus` team is to support the same versions of -Perl that are supported by the Perl toolchain. As of this writing that +Perl that are supported by the Perl Toolchain. As of this writing that means 5.16 and better. IRC: #native on irc.perl.org @@ -2584,7 +2584,7 @@ regulations. We can always tweak things later. - Please make an effort to follow existing coding style when making pull requests. - The intent of the `FFI-Platypus` team is to support the same versions of -Perl that are supported by the Perl toolchain. As of this writing that +Perl that are supported by the Perl Toolchain. As of this writing that means 5.16 and better. As such, please do not include any code that requires a newer version of Perl. @@ -2605,7 +2605,7 @@ the system doesn't provide `pkg-config` and `libffi` it will attempt to download `libffi` and build it from source. If you are including Platypus in a larger system (for example a Linux distribution) you only need to make sure to declare `pkg-config` or `pkgconf` and -the development package for `libffi` as prereqs for this module. +the development package for `libffi` as prerequisites for this module. # SEE ALSO diff --git a/dist.ini b/dist.ini index 8c3361ff..ab547608 100644 --- a/dist.ini +++ b/dist.ini @@ -263,6 +263,7 @@ match = ^corpus/ffi_build_mm/project1/blib filename = xt/author/pod_spelling_common.t filename = xt/author/strict.t +filename = xt/author/pod_spelling_system.t [AlienBase::Wrapper::Bundle] :version = 0.26 diff --git a/examples/archive.pl b/examples/archive.pl index 44881fa9..770723ed 100644 --- a/examples/archive.pl +++ b/examples/archive.pl @@ -5,7 +5,7 @@ use FFI::CheckLib (); # This example uses FreeBSD's libarchive to list the contents of any -# archive format that it suppors. We've also filled out a part of +# archive format that it supports. We've also filled out a part of # the ArchiveWrite class that could be used for writing archive formats # supported by libarchive diff --git a/examples/archive_object.pl b/examples/archive_object.pl index cb38155a..ac175003 100644 --- a/examples/archive_object.pl +++ b/examples/archive_object.pl @@ -4,7 +4,7 @@ use FFI::CheckLib qw( find_lib_or_die ); # This example uses FreeBSD's libarchive to list the contents of any -# archive format that it suppors. We've also filled out a part of +# archive format that it supports. We've also filled out a part of # the ArchiveWrite class that could be used for writing archive formats # supported by libarchive diff --git a/inc/Alien/Base/Wrapper.pm b/inc/Alien/Base/Wrapper.pm index d8af7407..ac96c853 100644 --- a/inc/Alien/Base/Wrapper.pm +++ b/inc/Alien/Base/Wrapper.pm @@ -14,7 +14,7 @@ use Text::ParseWords qw( shellwords ); # for this [AlienBase::Wrapper::Bundle] # ABSTRACT: Compiler and linker wrapper for Alien -our $VERSION = '2.83'; # VERSION +our $VERSION = '2.80'; # VERSION sub _join @@ -325,7 +325,7 @@ Alien::Base::Wrapper - Compiler and linker wrapper for Alien =head1 VERSION -version 2.83 +version 2.80 =head1 SYNOPSIS diff --git a/lib/FFI/Build.pm b/lib/FFI/Build.pm index 4de543c1..2594dad4 100644 --- a/lib/FFI/Build.pm +++ b/lib/FFI/Build.pm @@ -25,6 +25,8 @@ use File::Path (); # Hey Man! # There Goes The Platypus-Man +=for stopwords postlink ARGS + =head1 SYNOPSIS use FFI::Platypus 2.00; @@ -39,7 +41,7 @@ use File::Path (); my $lib = $build->build; my $ffi = FFI::Platypus->new( api => 2 ); - # The filename will be platform dependant, but something like libfrooble.so or frooble.dll + # The filename will be platform dependent, but something like libfrooble.so or frooble.dll $ffi->lib($lib->path); ... # use $ffi to attach functions in ffi/*.c @@ -347,7 +349,7 @@ sub _file_classes } # also anything already loaded, that might not be in the - # @INC path (for testing ususally) + # @INC path (for testing usually) push @file_classes, map { my $f = $_; $f =~ s/::$//; "FFI::Build::File::$f" } grep !/Base::/, diff --git a/lib/FFI/Build/File/Base.pm b/lib/FFI/Build/File/Base.pm index caaeb329..36531abd 100644 --- a/lib/FFI/Build/File/Base.pm +++ b/lib/FFI/Build/File/Base.pm @@ -28,7 +28,7 @@ Use it: my $file = FFI::Build::File::Foo->new('src/myfile.foo'); # generate a temp file with provided content - # file will be deletd when $file falls out of scope. + # file will be deleted when $file falls out of scope. my $file = FFI::Build::File::Foo->new(\'content for a temp foo'); diff --git a/lib/FFI/Build/Platform.pm b/lib/FFI/Build/Platform.pm index 1ba63e0d..9bce101b 100644 --- a/lib/FFI/Build/Platform.pm +++ b/lib/FFI/Build/Platform.pm @@ -13,6 +13,8 @@ use FFI::Platypus::ShareConfig; # ABSTRACT: Platform specific configuration. # VERSION +=for stopwords shellwords shellworded Wl + =head1 SYNOPSIS use FFI::Build::Platform; @@ -76,7 +78,7 @@ be used. my $osname = $platform->osname; -The "os name" as understood by Perl. This is the same as C<$^O>. +The Operating System's name as understood by Perl. This is the same as C<$^O>. =cut @@ -219,7 +221,7 @@ sub cxx return \@maybe if $self->which($maybe[0]); } - # TODO: there are probably situations, eg solaris + # TODO: there are probably situations, example: Solaris # where we don't want to try c++ in the case of # a ccname = gcc ? my @maybe = qw( c++ g++ clang++ ); @@ -253,7 +255,7 @@ sub cxxld $DB::single = 1; # This is definitely not exhaustive or complete or even - # particularlly good. Patches welcome. + # particularly good. Patches welcome. if($self->osname eq 'darwin') { diff --git a/lib/FFI/Platypus.pm b/lib/FFI/Platypus.pm index ab276e60..b39bd70e 100644 --- a/lib/FFI/Platypus.pm +++ b/lib/FFI/Platypus.pm @@ -21,11 +21,9 @@ use FFI::Platypus::Type; # From the original FFI::Platypus prototype: # Kinda like gluing a duckbill to an adorable mammal -=begin stopwords +=encoding UTF-8 -ØMQ - -=end stopwords +=for stopwords ØMQ centric html abi abis XORd HHGG Rubinius CURLOPT =head1 SYNOPSIS @@ -727,7 +725,7 @@ Examples: my $function = $ffi->function( $name => \@fixed_argument_types => \@var_argument_types); my $function = $ffi->function( $name => \@fixed_argument_types => \@var_argument_types => \&wrapper); -Version 0.91 and later allows you to creat functions for c variadic functions +Version 0.91 and later allows you to create functions for c variadic functions (such as printf, scanf, etc) which can take a variable number of arguments. The first set of arguments are the fixed set, the second set are the variable arguments to bind with. The variable argument types must be specified in order @@ -767,7 +765,7 @@ sub function $ret = 'void' unless defined $ret; # special case: treat a single void argument type as an empty list of - # arguments, a la olde timey C compilers. + # arguments, a la old-timey C compilers. if( (!defined $var_args) && @$fixed_args == 1 && $fixed_args->[0] eq 'void' ) { $fixed_args = []; @@ -1121,7 +1119,7 @@ sub def my $unittype = $ffi->unitof($type); For array and pointer types, returns the basic type without the array or pointer part. -In other words, for C or C it will return C. +In other words, for C or C it will return C. =cut @@ -1908,7 +1906,7 @@ one function with: The C is a large library with hundreds of methods. For comprehensive FFI bindings for C see L. -=head2 unix open +=head2 UNIX open =head3 C API @@ -1932,7 +1930,7 @@ of C (the latter being the default for the C type). Mainly just for demonstration since Perl has much better IO libraries, but now we have an OO interface to the Unix IO functions. -=head2 Varadic Functions (with libcurl) +=head2 Variadic Functions (with libcurl) =head3 C API @@ -1966,15 +1964,15 @@ but now we have an OO interface to the Unix IO functions. =head3 Discussion -The L library makes extensive use of "varadic" functions. +The L library makes extensive use of "variadic" functions. -The C programming language and ABI have the concept of "varadic" functions +The C programming language and ABI have the concept of "variadic" functions that can take a variable number and variable type of arguments. Assuming you have a C that supports it (and most modern systems should), -then you can create bindings to a varadic function by providing two sets -of array references, one for the fixed arguments (for reasons, C varadic +then you can create bindings to a variadic function by providing two sets +of array references, one for the fixed arguments (for reasons, C variadic functions must have at least one) and one for variable arguments. In -this example we call C as a varadic function. +this example we call C as a variadic function. For functions that have a large or infinite number of possible signatures it may be impracticable or impossible to attach them all. You can instead @@ -2024,7 +2022,7 @@ argument types and the return type. Inside the closure or callback we use the L from L again to avoid an I copy. We still -have to copy the buffer to append it to C<$hmtl> but it is at least one +have to copy the buffer to append it to C<$html> but it is at least one less copy. =head2 bundle your own code @@ -2150,7 +2148,7 @@ in writing interfaces that use enums. =head2 Memory leaks There are a couple places where memory is allocated, but never deallocated that may -look like memory leaks by tools designed to find memory leaks like valgrind. This +look like memory leaks by tools designed to find memory leaks like Valgrind. This memory is intended to be used for the lifetime of the perl process so there normally this isn't a problem unless you are embedding a Perl interpreter which doesn't closely match the lifetime of your overall application. @@ -2176,7 +2174,7 @@ for use cases where Perl and Platypus are embedded in a larger application where the lifetime of the Perl process is significantly smaller than the overall lifetime of the whole process. -=head2 I get seg faults on some platforms but not others with a library using pthreads. +=head2 I get segfaults on some platforms but not others with a library using pthreads. On some platforms, Perl isn't linked with C if Perl threads are not enabled. On some platforms this doesn't seem to matter, C can be @@ -2236,7 +2234,7 @@ written it yet. =head1 SUPPORT The intent of the C team is to support the same versions of -Perl that are supported by the Perl toolchain. As of this writing that +Perl that are supported by the Perl Toolchain. As of this writing that means 5.16 and better. IRC: #native on irc.perl.org @@ -2363,7 +2361,7 @@ requests. =item The intent of the C team is to support the same versions of -Perl that are supported by the Perl toolchain. As of this writing that +Perl that are supported by the Perl Toolchain. As of this writing that means 5.16 and better. As such, please do not include any code that requires a newer version of Perl. @@ -2390,7 +2388,7 @@ the system doesn't provide C and C it will attempt to download C and build it from source. If you are including Platypus in a larger system (for example a Linux distribution) you only need to make sure to declare C or C and -the development package for C as prereqs for this module. +the development package for C as prerequisites for this module. =head1 SEE ALSO @@ -2553,6 +2551,8 @@ Provides libffi for Platypus during its configuration and build stages. =back +=for stopwords Grinnz Ghedini MHOWARD Alessandro AWWAIID ALEXBIO + =head1 ACKNOWLEDGMENTS In addition to the contributors mentioned below, I would like to diff --git a/lib/FFI/Platypus/Buffer.pm b/lib/FFI/Platypus/Buffer.pm index 86f54833..3302e4b0 100644 --- a/lib/FFI/Platypus/Buffer.pm +++ b/lib/FFI/Platypus/Buffer.pm @@ -12,6 +12,8 @@ our @EXPORT_OK = qw ( scalar_to_pointer grow set_used_length window ); # ABSTRACT: Convert scalars to C buffers # VERSION +=for stopwords num + =head1 SYNOPSIS use FFI::Platypus::Buffer; @@ -83,7 +85,7 @@ copying the buffer instead. For example: ... # later when you know that the c code is no longer using the pointer - # Since you allocated the copy, you are responsible for free'ing it. + # Since you allocated the copy, you are responsible for freeing it. free($ptr_copy); =cut @@ -245,7 +247,7 @@ that the behavior of setting the UTF-8 flag on a buffer that does not contain UTF-8 as understood by the version of Perl that you are running is undefined. -I: If you have a buffer that needs to be free'd by C once the +I: If you have a buffer that needs to be freed by C once the scalar falls out of scope you can use L to apply magic to the scalar and free the pointer once it falls out of scope. diff --git a/lib/FFI/Platypus/Bundle.pm b/lib/FFI/Platypus/Bundle.pm index 75b31a5e..2745585d 100644 --- a/lib/FFI/Platypus/Bundle.pm +++ b/lib/FFI/Platypus/Bundle.pm @@ -8,6 +8,8 @@ use Carp (); # ABSTRACT: Bundle foreign code with your Perl module # VERSION +=for stopwords Ffi + =head1 SYNOPSIS C: @@ -318,7 +320,7 @@ not being able to find the header file. Probably something like this: ffi/answer.c:1:10: fatal error: 'answer.h' file not found So we put a C file in the C directory. (In case you -are wondering FBX stands for "Ffi Build and file eXtensions should +are wondering FBX stands for "Ffi Build and file extensions should whenever possible be three characters long"). The name of the file can be anything so long as it ends in C<.fbx>, we just choose C here because that is the name of the project. diff --git a/lib/FFI/Platypus/Closure.pm b/lib/FFI/Platypus/Closure.pm index 06035d83..c6b27832 100644 --- a/lib/FFI/Platypus/Closure.pm +++ b/lib/FFI/Platypus/Closure.pm @@ -98,7 +98,7 @@ sub call $closure->sticky; -Mark the closure sticky, meaning that it won't be free'd even if +Mark the closure sticky, meaning that it won't be freed even if all the reference of the object fall out of scope. =cut diff --git a/lib/FFI/Platypus/DL.pm b/lib/FFI/Platypus/DL.pm index 48ba6c8a..4735d74d 100644 --- a/lib/FFI/Platypus/DL.pm +++ b/lib/FFI/Platypus/DL.pm @@ -12,6 +12,8 @@ push @EXPORT, grep /RTLD_/, keys %FFI::Platypus::DL::; # ABSTRACT: Slightly non-portable interface to libdl # VERSION +=for stopwords dl + =head1 SYNOPSIS use FFI::Platypus 2.00; diff --git a/lib/FFI/Platypus/Lang/Win32.pm b/lib/FFI/Platypus/Lang/Win32.pm index 44f678a6..cfa168cf 100644 --- a/lib/FFI/Platypus/Lang/Win32.pm +++ b/lib/FFI/Platypus/Lang/Win32.pm @@ -8,6 +8,10 @@ use Config; # ABSTRACT: Documentation and tools for using Platypus with the Windows API # VERSION +=encoding UTF-8 + +=for stopwords abi + =head1 SYNOPSIS use utf8; @@ -40,7 +44,7 @@ use Config; =head1 DESCRIPTION -This module provides the Windows datatypes used by the Windows API. +This module provides the Windows data types used by the Windows API. This means that you can use things like C as an alias for C. The full list of type aliases is not documented here as it may change over time or be dynamic. You can get the list for your @@ -331,8 +335,8 @@ sub native_type_map } # stuff we are not yet dealing with - # LPCTSTR is unicode string, not currently supported - # LPWSTR 16 bit unicode string + # LPCTSTR is Unicode string, not currently supported + # LPWSTR 16 bit Unicode string # TBYTE TCHAR UNICODE_STRING WCHAR # Not supported: POINTER_32 POINTER_64 POINTER_SIGNED POINTER_UNSIGNED } diff --git a/lib/FFI/Platypus/Record.pm b/lib/FFI/Platypus/Record.pm index 3aee6d68..cdb74b7f 100644 --- a/lib/FFI/Platypus/Record.pm +++ b/lib/FFI/Platypus/Record.pm @@ -77,7 +77,7 @@ Before you get to deep into using this class you should also consider the L, which provides some overlapping functionality. Briefly, it comes down to this: -(The tl;dr is: use this class when you need to pass by value (since +(The TL;DR is: use this class when you need to pass by value (since L does not support pass by value) and use L in all other circumstances). @@ -213,7 +213,7 @@ Fixed length strings are included inside the record itself and do not need to be allocated or deallocated separately from the record. Variable length strings must be allocated on the heap, and thus require a sense of "ownership", that is whomever allocates variable length -strings should be responsible for also free'ing them. To handle this, +strings should be responsible for also freeing them. To handle this, you can add a C or C trait to a string field. The default is C, means that you can get, but not set its value: @@ -245,15 +245,15 @@ If you specify a field is C, then you can set its value: my $string = $foo->bar; # GOOD $foo->bar("starscream"); # GOOD -Any string value that is pointed to by the record will be free'd when it +Any string value that is pointed to by the record will be freed when it falls out of scope, so you must be very careful that any C fields are not set or modified by C code. You should also take care not to copy any record that has a C string in it because its values will -be free'd twice! +be freed twice! use Clone qw( clone ); - my $foo2 = clone $foo; # BAD bar will be free'd twice + my $foo2 = clone $foo; # BAD bar will be freed twice =head3 arrays @@ -371,7 +371,7 @@ sub record_layout my $count; my $ffi_type; - if($meta->{type} eq 'record') # this means fixed string atm + if($meta->{type} eq 'record') # this means fixed string at the moment { $ffi_type = 'sint8'; $count = $size; diff --git a/lib/FFI/Platypus/Type.pm b/lib/FFI/Platypus/Type.pm index 1efa713c..ff8da611 100644 --- a/lib/FFI/Platypus/Type.pm +++ b/lib/FFI/Platypus/Type.pm @@ -108,7 +108,7 @@ supported. Here are some useful ones: This converts a Perl string to a pointer address that can be used by functions that take an C type. Be carefully though that -the Perl string is not resized or free'd while in use from C code. +the Perl string is not resized or freed while in use from C code. my $string = $ffi->cast('opaque' => 'string', $pointer); @@ -485,13 +485,13 @@ get passed to a Platypus xsub they are converted into the native integer or C types. This type is most useful when a API provides an OO style interface with an integer or C value acting as an instance of a class. There are two detailed examples -in the main Platypus documentation using libarchive and unix open: +in the main Platypus documentation using libarchive and UNIX open: =over 4 =item L -=item L +=item L =back @@ -630,7 +630,7 @@ and return an opaque pointer to the string using a cast. $ffi->attach( print_message => ['get_message_t'] => 'void' ); my $get_message => $ffi->closure(sub { our $message = "my message"; # needs to be our so that it doesn't - # get free'd + # get freed my $ptr = $ffi->cast('string' => 'opaque', $message); return $ptr; }); @@ -778,7 +778,7 @@ okay to copy the record objects that you are dealing with if any of your functions will be returning one of them. Opaque pointers should be used when you do not know the size of the -object that you are using, or if the objects are created and free'd +object that you are using, or if the objects are created and freed through an API interface other than C and C. The examples in this section actually use pointers to records (note @@ -923,19 +923,19 @@ Care needs to be taken with scoping and closures, because of the way Perl and C handle responsibility for allocating memory differently. Perl keeps reference counts and frees objects when nothing is referencing them. In C the code that allocates the memory is considered -responsible for explicitly free'ing the memory for objects it has +responsible for explicitly freeing the memory for objects it has created when they are no longer needed. When you pass a closure into a C function, the C code has a pointer or reference to that object, but it has no way up letting Perl know when it is no longer using it. As a result, if you do not keep a reference to your closure around it will be -free'd by Perl and if the C code ever tries to call the closure it will +freed by Perl and if the C code ever tries to call the closure it will probably SIGSEGV. Thus supposing you have a C function C that takes a Perl closure, this is almost always wrong: set_closure($ffi->closure({ $_[0] * 2 })); # BAD In some cases, you may want to create a closure shouldn't ever be -free'd. For example you are passing a closure into a C function that +freed. For example you are passing a closure into a C function that will retain it for the lifetime of your application. You can use the sticky method to keep the closure, without the need to keep a reference of the closure: @@ -945,7 +945,7 @@ of the closure: $closure->sticky; set_closure($closure); # OKAY } - # closure still exists and is accesible from C, but + # closure still exists and is accessible from C, but # not from Perl land. =head2 Custom Types diff --git a/lib/FFI/Platypus/Type/StringArray.pm b/lib/FFI/Platypus/Type/StringArray.pm index 4b6afdf9..aeab6ae8 100644 --- a/lib/FFI/Platypus/Type/StringArray.pm +++ b/lib/FFI/Platypus/Type/StringArray.pm @@ -8,6 +8,8 @@ use FFI::Platypus; # ABSTRACT: Platypus custom type for arrays of strings # VERSION +=for stopwords arg0 arg1 arg2 arg3 + =head1 SYNOPSIS In your C code: diff --git a/lib/FFI/Platypus/Type/WideString.pm b/lib/FFI/Platypus/Type/WideString.pm index d859a4b7..432bee3a 100644 --- a/lib/FFI/Platypus/Type/WideString.pm +++ b/lib/FFI/Platypus/Type/WideString.pm @@ -12,6 +12,10 @@ use Carp (); # ABSTRACT: Platypus custom type for Unicode "wide" strings # VERSION +=encoding UTF-8 + +=for stopwords str + =head1 SYNOPSIS use FFI::Platypus 2.00; @@ -235,7 +239,7 @@ Because of the order in which objects are freed you cannot return a wide string if it is also a wide string argument to a function. For example C may crash if you specify the return value as a wide string: - # wchar_t *wcscpy(wchar_t *dest, const wchar_t *src); + # wchar_t *wcscpy(wchar_t *dst, const wchar_t *src); $ffi->attach( wcscpy => [ 'wstring_w', 'wstring' ] => 'wstring' ); # no my $str; wcscpy( \$str, "I ❤ perl + Platypus"); # may crash on memory error @@ -344,7 +348,7 @@ sub ffi_custom_type_api_1 # any Windows PATH (260*4)+2 = 1042 # # (assuming all characters in the PATH are in the BMP, which is - # admitedly unlikely, possilby impossible (?) and and a null + # admittedly unlikely, possibly impossible (?) and and a null # termination of two bytes). # # it is arbitrary and based on a platform specific windows diff --git a/lib/FFI/Platypus/TypeParser/Version0.pm b/lib/FFI/Platypus/TypeParser/Version0.pm index af76187b..74732563 100644 --- a/lib/FFI/Platypus/TypeParser/Version0.pm +++ b/lib/FFI/Platypus/TypeParser/Version0.pm @@ -9,6 +9,8 @@ use parent qw( FFI::Platypus::TypeParser ); # ABSTRACT: FFI Type Parser Version Zero # VERSION +=for stopwords Darmok Tanagra + =head1 SYNOPSIS use FFI::Platypus; @@ -103,7 +105,7 @@ sub parse return $self->types->{$name} if defined $self->types->{$name}; - # Darmock and Legacy Code at Tanagra + # Darmok and Legacy Code at Tanagra unless($name =~ /-\>/ || $name =~ /^record\s*\([0-9A-Z:a-z_]+\)$/ || $name =~ /^string(_rw|_ro|\s+rw|\s+ro|\s*\([0-9]+\))$/) { diff --git a/lib/FFI/Platypus/TypeParser/Version1.pm b/lib/FFI/Platypus/TypeParser/Version1.pm index d7dd8388..c2b9d80f 100644 --- a/lib/FFI/Platypus/TypeParser/Version1.pm +++ b/lib/FFI/Platypus/TypeParser/Version1.pm @@ -26,7 +26,7 @@ This type parser was included with L starting with version C<0.91> in an experimental capability, and C<1.00> as a stable interface. Starting with version C<1.00> the main L documentation describes the version 1 API and you can refer to -L for details on the version0 API. +L for details on the version 0 API. =head1 SEE ALSO diff --git a/lib/FFI/Platypus/TypeParser/Version2.pm b/lib/FFI/Platypus/TypeParser/Version2.pm index 9c79eb2f..d5a82631 100644 --- a/lib/FFI/Platypus/TypeParser/Version2.pm +++ b/lib/FFI/Platypus/TypeParser/Version2.pm @@ -22,7 +22,7 @@ This type parser was included with L starting with version C<1.58> in an experimental capability, and C<2.00> as a stable interface. Starting with version C<1.00> the main L documentation describes the version 2 API and you can refer to -L for details on the version1 API. +L for details on the version 1 API. =head1 SEE ALSO diff --git a/lib/FFI/Probe.pm b/lib/FFI/Probe.pm index 06ef3c6f..057572ff 100644 --- a/lib/FFI/Probe.pm +++ b/lib/FFI/Probe.pm @@ -14,6 +14,8 @@ use FFI::Temp; # ABSTRACT: System detection and probing for FFI extensions. # VERSION +=for stopwords stmt decl + =head1 SYNOPSIS use FFI::Probe; diff --git a/lib/FFI/Probe/Runner/Builder.pm b/lib/FFI/Probe/Runner/Builder.pm index af76ed67..4d2c9aa6 100644 --- a/lib/FFI/Probe/Runner/Builder.pm +++ b/lib/FFI/Probe/Runner/Builder.pm @@ -307,7 +307,7 @@ sub build $self->extract; # this should really be done in `new` but the build - # scripts for FFI-Platypus edit the ldfalgs from there + # scripts for FFI-Platypus edit the ldflags from there # so. Also this may actually belong in FFI::Build::Platform # which would resolve the problem. if($^O eq 'MSWin32' && $Config{ccname} eq 'cl') diff --git a/lib/FFI/Temp.pm b/lib/FFI/Temp.pm index a2cefd41..bdbda6dc 100644 --- a/lib/FFI/Temp.pm +++ b/lib/FFI/Temp.pm @@ -22,7 +22,7 @@ This class is private to L. # we have to be careful about cleanup. This puts all that # (attempted) carefulness in one place so that when we # later discover it isn't so careful we can fix it in -# one place rather thabn alllll the places that we need +# one place rather than alllll the places that we need # temp directories. my %root; diff --git a/maint/cip-before-install b/maint/cip-before-install index e4463232..887b48bf 100755 --- a/maint/cip-before-install +++ b/maint/cip-before-install @@ -6,6 +6,8 @@ cip sudo apt-get update cip sudo apt-get install libffi-dev cip exec cpanm -n version +cip exec dzil-cpanm -n Test::SpellCheck + if [ "$CIP_TAG" == "5.34" ]; then cip exec cpanm -n forks fi diff --git a/spellcheck.ini b/spellcheck.ini new file mode 100644 index 00000000..7282e24f --- /dev/null +++ b/spellcheck.ini @@ -0,0 +1,341 @@ +file = lib/**/*.pm +[Perl] +lang = en-us +check_comments = 1 +skip_sections = contributors +skip_sections = author +skip_sections = copyright and license + +[StopWords] +word = Version0 +word = Version1 +word = Version2 +word = MYVERSION +word = MYHEADER +word = MYPI +word = FreeBSD's +word = bzlib.h +word = TypeParser +word = 16LE +word = ArchiveRead +word = ArchiveWrite +word = ArchiveEntry +word = UNIXen +word = ccname +word = ccflags +word = bzip2 +word = Bzip2 +word = bz2 +word = buildname +word = buf +word = alllll +word = alignof +word = answer.fbx +word = myheader.h +word = WRITEFUNCTION +; -DFOO +word = DFOO +word = FBX +word = cppreference +word = countof +word = zmq +word = zmq3 +word = src +word = dst +word = dir +word = rv +word = realclean +word = pre +word = pkgconf +word = osname +word = or'd +word = ok +word = myint +word = libzmq +word = libzmq3 +word = libpthreads +word = libnotify +word = Libnotify +word = libfrooble.so +word = frooble.dll +word = libfoo +word = libtest +word = ldflags +word = lddlflags +word = irc.perl.org +word = ints +word = ffi +word = ffcall +word = fbx +word = dyncall +word = RTLD +word = PerlFFI +word = fmt +; old-timey +word = timey +word = kindof +word = ushort +word = ulong +word = unitof +word = uint8 +word = uint16 +word = uint32 +word = uint64 +word = sint8 +word = sint16 +word = sint32 +word = sint64 +word = uint +word = uchar +word = dlrun +word = dlmain +word = senum +word = longdouble +word = foo.t +word = foo.pl +word = Foo.pm +word = foo.o +word = foo.c +word = cflags +; .dylib +word = dylib +word = cygarchive +word = cxxld + +; Perl +word = MakeMaker +word = Makefile.PL +word = Toolchain +word = xsub +word = typemaps +word = time.pl +word = add.pl +word = archive.pl +word = color.pl +word = closure.pl +word = char.pl +word = swap.pl +word = puts.pl +word = pipe.pl +word = curl.pl +word = person.pl +word = opaque.pl +word = notify.pl +word = malloc.pl +word = Const.pm +word = Answer.pm +word = Init.pm +word = dist.ini +word = diag +word = scalar's +word = regexes +word = postamble +word = Raku +word = hashref +word = coderef +; bsd_glob +word = bsd + +; actual word: +word = unstick +word = smushes +word = sensical +word = prepended +word = performant +word = parentheticals +word = featureful +word = decrypted +word = customizations +word = callee +word = autodetect +word = accessor +word = Unmark + +; computers +word = ABI +word = ABIs +word = APIs +word = ASM +word = BMP +word = JRuby +word = Makefile +word = Solaris +word = WebAssembly +word = Win32 +word = Zig +word = api +word = arg +word = args +word = FIXME +word = subdirectory +word = x86 +word = whitespace +word = encodings +word = destructors +word = destructor +word = dereferencing +word = demangled +word = deinitialization +word = rw +word = ro +word = reimplemented +word = programmatically +word = pathname +word = pathnames +word = libs +word = libffi +word = libc +word = libcurl +word = libarchive +word = exe +word = deallocating +word = NULLs +word = integrators +word = i8 +word = i16 +word = i32 +word = i64 +word = i128 +word = s8 +word = s16 +word = s32 +word = s64 +word = s128 +word = init +word = https +word = glibc +word = github.com +word = deallocated +word = deallocate +word = cmd +word = Fortran +word = accessors + +; windows +word = GetCurrentDirectoryW +word = GetCurrentDirectory +word = HWND +word = LPWSTR +word = LPCWSTR +word = LPCTSTR +word = winuser.h +word = win32 +; .dll +word = dll +word = name.dll +; wint_t +word = wint +word = libarchive.dll +word = archive.dll +word = MessageBoxW +word = DWORD +word = WideString +word = TCHAR +word = TBYTE + +; macos +word = libarchive.bundle + +; unix +; /tmp +word = tmp +word = noexec +word = name.so +word = libarchive.so +word = libdl +; -lfoo +word = lfoo +word = ld +; -fPIC +word = fPIC +word = SIGSEGV + +; wcs* +word = wcs + +; wchar_t +word = wchar +word = WCHAR + +; wchar_t wc +word = wc + +; C stuff: +word = calloc +word = baz +word = argv +word = argc +word = Valgrind +word = Variadic +word = variadic +word = wcschr +word = wcscpy +word = wcsdup +word = tm +word = swap.c +word = add.c +word = answer.c +word = alloca +word = closure.c +word = structs +word = struct +word = strlen +word = strndup +word = strdup +word = enum +word = Enum +word = enums +word = strcpy +word = stderr +word = stdout +word = stdin +word = stdbool.h +word = string.h +word = stdlib.h +word = stdio.h +word = stdint.h +word = ifndef +word = endif +word = sizeof +word = dlsym +word = dlrun.c +word = dlopen +word = dlerror +word = dlclose +word = scanf +word = realloc +word = pthreads +word = person.c +word = memset +word = memcpy +word = malloc +word = isdigit +word = isalpha +; int8_t +word = int8 +word = int16 +word = int32 +word = int64 +; RTLD_* +word = NODELETE +word = NOLOAD +word = init.c +word = const.c +word = cxx +word = cpp +word = const +word = compress.c +word = color.c +word = CPP +word = answer.h + +; $utf8 +word = utf8 + +; FAQ +word = faq + +; FIXME Pod::Weaver moving +word = Ffi +word = Rubinius +word = centric diff --git a/xt/author/spellcheck.t b/xt/author/spellcheck.t new file mode 100644 index 00000000..84b7de40 --- /dev/null +++ b/xt/author/spellcheck.t @@ -0,0 +1,6 @@ +use Test2::V0; +use Test::SpellCheck; + +spell_check_ini; + +done_testing;