d_heap 0.3.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/rspec DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rspec' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rspec-core", "rspec")
data/bin/rubocop DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rubocop' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rubocop", "rubocop")
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/ext/d_heap/d_heap.h DELETED
@@ -1,41 +0,0 @@
1
- #ifndef D_HEAP_H
2
- #define D_HEAP_H 1
3
-
4
- #include "ruby.h"
5
-
6
- // d=4 uses the fewest comparisons for insert + delete-min (in the worst case).
7
- #define DHEAP_DEFAULT_D 4
8
-
9
- // This is a somewhat arbitary maximum. But benefits from more leaf nodes
10
- // are very unlikely to outweigh the increasinly higher number of worst-case
11
- // comparisons as d gets further from 4.
12
- #define DHEAP_MAX_D 32
13
-
14
- VALUE rb_cDHeap;
15
-
16
- // copied from pg gem
17
-
18
- #define UNUSED(x) ((void)(x))
19
-
20
- #ifdef HAVE_RB_GC_MARK_MOVABLE
21
- #define dheap_compact_callback(x) ((void (*)(void*))(x))
22
- #define dheap_gc_location(x) x = rb_gc_location(x)
23
- #else
24
- #define rb_gc_mark_movable(x) rb_gc_mark(x)
25
- #define dheap_compact_callback(x) {(x)}
26
- #define dheap_gc_location(x) UNUSED(x)
27
- #endif
28
-
29
- // from internal/compar.h
30
- #define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
31
-
32
- #ifdef __D_HEAP_DEBUG
33
- #define debug(v) { \
34
- ID sym_puts = rb_intern("puts"); \
35
- rb_funcall(rb_mKernel, sym_puts, 1, v); \
36
- }
37
- #else
38
- #define debug(v)
39
- #endif
40
-
41
- #endif /* D_HEAP_H */