Update upstream source from tag 'upstream/0.004'
Update to upstream version '0.004'
with Debian dir 70e8f71873e439c341588c5ab76ce4bece3be61e
gregor herrmann
4 years ago
14 | 14 | |
15 | 15 | #define MIN_PERL_VERSION_FOR_COW 20 |
16 | 16 | |
17 | #if PERL_REVISION >= 5 && PERL_VERSION >= MIN_PERL_VERSION_FOR_COW | |
17 | #if defined(SV_COW_REFCNT_MAX) | |
18 | 18 | # define B_CAN_COW 1 |
19 | 19 | #else |
20 | 20 | # define B_CAN_COW 0 |
21 | 21 | #endif |
22 | ||
23 | /* CowREFCNT is incorrect on Perl < 5.32 */ | |
24 | #define myCowREFCNT(sv) ((SvLEN(sv)>0) ? CowREFCNT(sv) : 0) | |
22 | 25 | |
23 | 26 | MODULE = B__COW PACKAGE = B::COW |
24 | 27 | |
59 | 62 | #if !B_CAN_COW |
60 | 63 | XSRETURN_UNDEF; |
61 | 64 | #else |
62 | if ( SvIsCOW(sv) ) XSRETURN_IV( CowREFCNT(sv) ); | |
65 | if ( SvIsCOW(sv) ) XSRETURN_IV( myCowREFCNT(sv) ); | |
63 | 66 | #endif |
64 | 67 | XSRETURN_UNDEF; |
65 | 68 | } |
0 | 0 | Revision history for B-COW |
1 | ||
2 | 0.004 2020-04-23 14:41:21-06:00 America/Denver | |
3 | ||
4 | fix CowREFCNT issues on big endian | |
5 | ||
6 | 0.003 2020-04-20 09:59:34-06:00 America/Denver | |
7 | ||
8 | support for Perl compiled without COW | |
1 | 9 | |
2 | 10 | 0.002 2020-01-29 12:13:52-07:00 America/Denver |
3 | 11 |
51 | 51 | "provides" : { |
52 | 52 | "B::COW" : { |
53 | 53 | "file" : "lib/B/COW.pm", |
54 | "version" : "0.002" | |
54 | "version" : "0.004" | |
55 | 55 | } |
56 | 56 | }, |
57 | 57 | "release_status" : "stable", |
65 | 65 | "web" : "https://github.com/atoomic/B-COW.git" |
66 | 66 | } |
67 | 67 | }, |
68 | "version" : "0.002", | |
68 | "version" : "0.004", | |
69 | 69 | "x_Dist_Zilla" : { |
70 | 70 | "perl" : { |
71 | "version" : "5.026002" | |
71 | "version" : "5.030001" | |
72 | 72 | }, |
73 | 73 | "plugins" : [ |
74 | 74 | { |
269 | 269 | "meta_noindex" : 1 |
270 | 270 | }, |
271 | 271 | "Dist::Zilla::Role::ModuleMetadata" : { |
272 | "Module::Metadata" : "1.000033", | |
272 | "Module::Metadata" : "1.000036", | |
273 | 273 | "version" : "0.006" |
274 | 274 | } |
275 | 275 | }, |
292 | 292 | "remotes_must_exist" : 1 |
293 | 293 | }, |
294 | 294 | "Dist::Zilla::Role::Git::Repo" : { |
295 | "git_version" : "2.21.1 (Apple Git-122.3)", | |
295 | "git_version" : "2.24.2 (Apple Git-127)", | |
296 | 296 | "repo_root" : "." |
297 | 297 | } |
298 | 298 | }, |
341 | 341 | "changelog" : "Changes" |
342 | 342 | }, |
343 | 343 | "Dist::Zilla::Role::Git::Repo" : { |
344 | "git_version" : "2.21.1 (Apple Git-122.3)", | |
344 | "git_version" : "2.24.2 (Apple Git-127)", | |
345 | 345 | "repo_root" : "." |
346 | 346 | } |
347 | 347 | }, |
369 | 369 | "changelog" : "Changes" |
370 | 370 | }, |
371 | 371 | "Dist::Zilla::Role::Git::Repo" : { |
372 | "git_version" : "2.21.1 (Apple Git-122.3)", | |
372 | "git_version" : "2.24.2 (Apple Git-127)", | |
373 | 373 | "repo_root" : "." |
374 | 374 | }, |
375 | 375 | "Dist::Zilla::Role::Git::StringFormatter" : { |
386 | 386 | "branch" : null, |
387 | 387 | "changelog" : "Changes", |
388 | 388 | "signed" : 0, |
389 | "tag" : "v0.002", | |
389 | "tag" : "v0.004", | |
390 | 390 | "tag_format" : "v%V", |
391 | 391 | "tag_message" : "v%V" |
392 | 392 | }, |
393 | 393 | "Dist::Zilla::Role::Git::Repo" : { |
394 | "git_version" : "2.21.1 (Apple Git-122.3)", | |
394 | "git_version" : "2.24.2 (Apple Git-127)", | |
395 | 395 | "repo_root" : "." |
396 | 396 | }, |
397 | 397 | "Dist::Zilla::Role::Git::StringFormatter" : { |
412 | 412 | "remotes_must_exist" : 1 |
413 | 413 | }, |
414 | 414 | "Dist::Zilla::Role::Git::Repo" : { |
415 | "git_version" : "2.21.1 (Apple Git-122.3)", | |
415 | "git_version" : "2.24.2 (Apple Git-127)", | |
416 | 416 | "repo_root" : "." |
417 | 417 | } |
418 | 418 | }, |
456 | 456 | "version_regexp" : "(?^:^v(.+)$)" |
457 | 457 | }, |
458 | 458 | "Dist::Zilla::Role::Git::Repo" : { |
459 | "git_version" : "2.21.1 (Apple Git-122.3)", | |
459 | "git_version" : "2.24.2 (Apple Git-127)", | |
460 | 460 | "repo_root" : "." |
461 | 461 | } |
462 | 462 | }, |
640 | 640 | "version" : "6.012" |
641 | 641 | } |
642 | 642 | }, |
643 | "x_generated_by_perl" : "v5.26.2", | |
644 | "x_serialization_backend" : "Cpanel::JSON::XS version 4.06" | |
643 | "x_generated_by_perl" : "v5.30.1", | |
644 | "x_serialization_backend" : "Cpanel::JSON::XS version 4.19" | |
645 | 645 | } |
646 | 646 |
18 | 18 | provides: |
19 | 19 | B::COW: |
20 | 20 | file: lib/B/COW.pm |
21 | version: '0.002' | |
21 | version: '0.004' | |
22 | 22 | requires: |
23 | 23 | perl: '5.008' |
24 | 24 | resources: |
25 | 25 | bugtracker: https://github.com/atoomic/B-COW/issues |
26 | 26 | repository: https://github.com/atoomic/B-COW.git |
27 | version: '0.002' | |
27 | version: '0.004' | |
28 | 28 | x_Dist_Zilla: |
29 | 29 | perl: |
30 | version: '5.026002' | |
30 | version: '5.030001' | |
31 | 31 | plugins: |
32 | 32 | - |
33 | 33 | class: Dist::Zilla::Plugin::OurPkgVersion |
183 | 183 | inherit_version: '1' |
184 | 184 | meta_noindex: '1' |
185 | 185 | Dist::Zilla::Role::ModuleMetadata: |
186 | Module::Metadata: '1.000033' | |
186 | Module::Metadata: '1.000036' | |
187 | 187 | version: '0.006' |
188 | 188 | name: MetaProvides::Package |
189 | 189 | version: '2.004003' |
200 | 200 | - 'gh HEAD:refs/heads/released' |
201 | 201 | remotes_must_exist: 1 |
202 | 202 | Dist::Zilla::Role::Git::Repo: |
203 | git_version: '2.21.1 (Apple Git-122.3)' | |
203 | git_version: '2.24.2 (Apple Git-127)' | |
204 | 204 | repo_root: . |
205 | 205 | name: Git::Push |
206 | 206 | version: '2.046' |
236 | 236 | allow_dirty_match: [] |
237 | 237 | changelog: Changes |
238 | 238 | Dist::Zilla::Role::Git::Repo: |
239 | git_version: '2.21.1 (Apple Git-122.3)' | |
239 | git_version: '2.24.2 (Apple Git-127)' | |
240 | 240 | repo_root: . |
241 | 241 | name: '@Git/Check' |
242 | 242 | version: '2.046' |
257 | 257 | allow_dirty_match: [] |
258 | 258 | changelog: Changes |
259 | 259 | Dist::Zilla::Role::Git::Repo: |
260 | git_version: '2.21.1 (Apple Git-122.3)' | |
260 | git_version: '2.24.2 (Apple Git-127)' | |
261 | 261 | repo_root: . |
262 | 262 | Dist::Zilla::Role::Git::StringFormatter: |
263 | 263 | time_zone: local |
270 | 270 | branch: ~ |
271 | 271 | changelog: Changes |
272 | 272 | signed: 0 |
273 | tag: v0.002 | |
273 | tag: v0.004 | |
274 | 274 | tag_format: v%V |
275 | 275 | tag_message: v%V |
276 | 276 | Dist::Zilla::Role::Git::Repo: |
277 | git_version: '2.21.1 (Apple Git-122.3)' | |
277 | git_version: '2.24.2 (Apple Git-127)' | |
278 | 278 | repo_root: . |
279 | 279 | Dist::Zilla::Role::Git::StringFormatter: |
280 | 280 | time_zone: local |
289 | 289 | - 'gh HEAD:refs/heads/released' |
290 | 290 | remotes_must_exist: 1 |
291 | 291 | Dist::Zilla::Role::Git::Repo: |
292 | git_version: '2.21.1 (Apple Git-122.3)' | |
292 | git_version: '2.24.2 (Apple Git-127)' | |
293 | 293 | repo_root: . |
294 | 294 | name: '@Git/Push' |
295 | 295 | version: '2.046' |
322 | 322 | version_by_branch: 0 |
323 | 323 | version_regexp: (?^:^v(.+)$) |
324 | 324 | Dist::Zilla::Role::Git::Repo: |
325 | git_version: '2.21.1 (Apple Git-122.3)' | |
325 | git_version: '2.24.2 (Apple Git-127)' | |
326 | 326 | repo_root: . |
327 | 327 | name: Git::NextVersion |
328 | 328 | version: '2.046' |
463 | 463 | config: |
464 | 464 | is_trial: '0' |
465 | 465 | version: '6.012' |
466 | x_generated_by_perl: v5.26.2 | |
466 | x_generated_by_perl: v5.30.1 | |
467 | 467 | x_serialization_backend: 'YAML::Tiny version 1.73' |
22 | 22 | "File::Spec" => 0, |
23 | 23 | "Test::More" => 0 |
24 | 24 | }, |
25 | "VERSION" => "0.002", | |
25 | "VERSION" => "0.004", | |
26 | 26 | "test" => { |
27 | 27 | "TESTS" => "t/*.t" |
28 | 28 | } |
0 | 0 | This archive contains the distribution B-COW, |
1 | version 0.002: | |
1 | version 0.004: | |
2 | 2 | |
3 | 3 | B::COW additional B helpers to check COW status |
4 | 4 |
6 | 6 | |
7 | 7 | use base 'Exporter'; |
8 | 8 | |
9 | our $VERSION = '0.002'; # VERSION: generated by DZP::OurPkgVersion | |
9 | our $VERSION = '0.004'; # VERSION: generated by DZP::OurPkgVersion | |
10 | 10 | |
11 | 11 | use XSLoader; |
12 | 12 | |
37 | 37 | |
38 | 38 | =head1 VERSION |
39 | 39 | |
40 | version 0.002 | |
40 | version 0.004 | |
41 | 41 | |
42 | 42 | =head1 SYNOPSIS |
43 | 43 |
7 | 7 | |
8 | 8 | use B::COW qw{:all}; |
9 | 9 | |
10 | if ( $] >= 5.020 ) { | |
10 | if ( can_cow() ) { | |
11 | 11 | ok can_cow(), "can cow with Perl $]"; |
12 | 12 | |
13 | 13 | ok !is_cow(undef), "!is_cow(undef)"; |
51 | 51 | } |
52 | 52 | |
53 | 53 | { |
54 | my %h = ( 'a'..'d' ); | |
55 | foreach my $k ( sort keys %h ) { | |
56 | ok is_cow( $k ), "key $k is cowed"; | |
57 | is cowrefcnt( $k ), 0, "hash key $k cowrefcnt is 0" or Dump($k); | |
58 | } | |
54 | my %h = ( 'my_hash_key' => 'value' ); | |
55 | my @keys = keys %h; | |
56 | ok is_cow( $keys[0] ), "hash key is cowed"; | |
57 | is cowrefcnt( $keys[0] ), 0, "hash key cowrefcnt is 0" or die Dump($keys[0]); | |
59 | 58 | } |
60 | 59 | |
61 | 60 | } else { |