Changeset 34382 in project


Ignore:
Timestamp:
08/26/17 23:28:15 (4 weeks ago)
Author:
kon
Message:

add raw-update

Location:
release/4/hashes/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/hashes/trunk/hashes-macros.scm

    r19826 r34382  
    2222  (string->symbol (string-append (symbol->string (strip-syntax name)) "-update")) )
    2323
     24(define-for-syntax (gen-raw-update-proc-sym name)
     25  (string->symbol (string-append (symbol->string (strip-syntax name)) "-raw-update")) )
     26
    2427;;
    2528
     
    3740           (,(gen-prim-proc-sym ?name) dat len initval) ) ) ) ) )
    3841
    39 #;
    40 (define-syntax (gen-update-proc f r c)
    41   (let ((?name (cadr f)))
    42     `(,(r 'define) ,(gen-update-proc-sym ?name)
    43        (,(r 'foreign-lambda*) ,(r 'void) ((,(r 'c-pointer) ctx)
    44                                           (,(r 'scheme-pointer) dat)
    45                                           (,(r 'unsigned-integer32) len))
    46          ,(string-append
    47             "((hashctx *) ctx)->hash = "
    48             (symbol->string (strip-syntax ?name))
    49             "( (uint8_t *) dat, (uint32_t) len, ((hashctx *) ctx)->hash );"))) ) )
    50 
    51 (define-syntax (gen-update-proc f r c)
     42(define-for-syntax (gen-cooked-update-proc f r c)
    5243  (let ((?name (cadr f)))
    5344    `(,(r 'define) ,(gen-update-proc-sym ?name)
     
    6051            "( (uint8_t *) dat, (uint32_t) len, ((hashctx *) ctx)->hash );"))) ) )
    6152
     53(define-for-syntax (gen-raw-update-proc f r c)
     54  (let ((?name (cadr f)))
     55    `(,(r 'define) ,(gen-raw-update-proc-sym ?name)
     56       (,(r 'foreign-lambda*) void ((,(r 'c-pointer) ctx)
     57                                    (,(r 'c-pointer) dat)
     58                                    (,(r 'unsigned-integer32) len))
     59         ,(string-append
     60            "((hashctx *) ctx)->hash = "
     61            (symbol->string (strip-syntax ?name))
     62            "( (uint8_t *) dat, (uint32_t) len, ((hashctx *) ctx)->hash );"))) ) )
     63
     64(define-syntax (gen-update-proc f r c)
     65  `(,(r 'begin)
     66    ,(gen-cooked-update-proc f r c)
     67    ,(gen-raw-update-proc f r c) ) )
     68
    6269(define-syntax (gen-md-api f r c)
    6370  (let ((?name (cadr f)))
    6471    (let ((PN (gen-algo-proc-sym ?name))
    65           (UN (gen-update-proc-sym ?name)))
     72          (S-UN (gen-update-proc-sym ?name))
     73          (R-UN (gen-raw-update-proc-sym ?name)))
    6674      `(,(r 'define) ,PN
    6775        (,(r 'let) ((the-prim #f))
     
    7482                           ,(r 'unsigned-integer32-size)
    7583                           ,(r 'generic-init)
    76                            ,UN
     84                           ,S-UN
    7785                           ,(r 'generic-final)
    78                            ',PN))
     86                           ',PN
     87                           ,R-UN))
    7988                  the-prim ) ) ) ) ) ) ) )
  • release/4/hashes/trunk/hashes.meta

    r27974 r34382  
    99 (depends
    1010        (setup-helper "1.5.2")
    11         (message-digest "2.3.1")
     11        (message-digest "3.4.0")
    1212        (miscmacros "2.91")
    1313        (moremacros "1.1.1")
  • release/4/hashes/trunk/hashes.setup

    r27974 r34382  
    55(verify-extension-name "hashes")
    66
    7 (setup-shared-extension-module 'hashes-support (extension-version "1.1.3")
     7(setup-shared-extension-module 'hashes-support (extension-version "1.2.0")
    88  #:types #t
    99  #:inline #t
     
    1515    -no-procedure-checks -no-bound-checks -no-argc-checks))
    1616
    17 (setup-shared-extension-module 'hash-utils (extension-version "1.1.3")
     17(setup-shared-extension-module 'hash-utils (extension-version "1.2.0")
    1818  #:types #t
    1919  #:inline #t
     
    2828  -no-procedure-checks -no-bound-checks))
    2929
    30 (setup-shared-extension-module 'RJMXHash (extension-version "1.1.3")
     30(setup-shared-extension-module 'RJMXHash (extension-version "1.2.0")
    3131  #:compile-options hash-compile-options)
    32 (setup-shared-extension-module 'TWMXHash (extension-version "1.1.3")
     32(setup-shared-extension-module 'TWMXHash (extension-version "1.2.0")
    3333  #:compile-options hash-compile-options)
    34 (setup-shared-extension-module 'TWMGMXHash (extension-version "1.1.3")
     34(setup-shared-extension-module 'TWMGMXHash (extension-version "1.2.0")
    3535  #:compile-options hash-compile-options)
    36 (setup-shared-extension-module 'TWSHMXHash (extension-version "1.1.3")
     36(setup-shared-extension-module 'TWSHMXHash (extension-version "1.2.0")
    3737  #:compile-options hash-compile-options)
    38 (setup-shared-extension-module 'TWSHMLMXHash (extension-version "1.1.3")
     38(setup-shared-extension-module 'TWSHMLMXHash (extension-version "1.2.0")
    3939  #:compile-options hash-compile-options)
    40 (setup-shared-extension-module 'FNVHash (extension-version "1.1.3")
     40(setup-shared-extension-module 'FNVHash (extension-version "1.2.0")
    4141  #:compile-options hash-compile-options)
    42 (setup-shared-extension-module 'FNVAHash (extension-version "1.1.3")
     42(setup-shared-extension-module 'FNVAHash (extension-version "1.2.0")
    4343  #:compile-options hash-compile-options)
    44 (setup-shared-extension-module 'PHSFHash (extension-version "1.1.3")
     44(setup-shared-extension-module 'PHSFHash (extension-version "1.2.0")
    4545  #:compile-options hash-compile-options)
    46 (setup-shared-extension-module 'RSHash (extension-version "1.1.3")
     46(setup-shared-extension-module 'RSHash (extension-version "1.2.0")
    4747  #:compile-options hash-compile-options)
    48 (setup-shared-extension-module 'JSHash (extension-version "1.1.3")
     48(setup-shared-extension-module 'JSHash (extension-version "1.2.0")
    4949  #:compile-options hash-compile-options)
    50 (setup-shared-extension-module 'PJWHash (extension-version "1.1.3")
     50(setup-shared-extension-module 'PJWHash (extension-version "1.2.0")
    5151  #:compile-options hash-compile-options)
    52 (setup-shared-extension-module 'ELFHash (extension-version "1.1.3")
     52(setup-shared-extension-module 'ELFHash (extension-version "1.2.0")
    5353  #:compile-options hash-compile-options)
    54 (setup-shared-extension-module 'BKDRHash (extension-version "1.1.3")
     54(setup-shared-extension-module 'BKDRHash (extension-version "1.2.0")
    5555  #:compile-options hash-compile-options)
    56 (setup-shared-extension-module 'SDBMHash (extension-version "1.1.3")
     56(setup-shared-extension-module 'SDBMHash (extension-version "1.2.0")
    5757  #:compile-options hash-compile-options)
    58 (setup-shared-extension-module 'DJBHash (extension-version "1.1.3")
     58(setup-shared-extension-module 'DJBHash (extension-version "1.2.0")
    5959  #:compile-options hash-compile-options)
    60 (setup-shared-extension-module 'NDJBHash (extension-version "1.1.3")
     60(setup-shared-extension-module 'NDJBHash (extension-version "1.2.0")
    6161  #:compile-options hash-compile-options)
    62 (setup-shared-extension-module 'DEKHash (extension-version "1.1.3")
     62(setup-shared-extension-module 'DEKHash (extension-version "1.2.0")
    6363  #:compile-options hash-compile-options)
    64 (setup-shared-extension-module 'APHash (extension-version "1.1.3")
     64(setup-shared-extension-module 'APHash (extension-version "1.2.0")
    6565  #:compile-options hash-compile-options)
    66 (setup-shared-extension-module 'BRPHash (extension-version "1.1.3")
     66(setup-shared-extension-module 'BRPHash (extension-version "1.2.0")
    6767  #:compile-options hash-compile-options)
    68 (setup-shared-extension-module 'PYHash (extension-version "1.1.3")
     68(setup-shared-extension-module 'PYHash (extension-version "1.2.0")
    6969  #:compile-options hash-compile-options)
    70 (setup-shared-extension-module 'RJL3Hash (extension-version "1.1.3")
     70(setup-shared-extension-module 'RJL3Hash (extension-version "1.2.0")
    7171  #:compile-options hash-compile-options)
    72 (setup-shared-extension-module 'ISPLHash (extension-version "1.1.3")
     72(setup-shared-extension-module 'ISPLHash (extension-version "1.2.0")
    7373  #:compile-options hash-compile-options)
    74 (setup-shared-extension-module 'CRCHash (extension-version "1.1.3")
     74(setup-shared-extension-module 'CRCHash (extension-version "1.2.0")
    7575  #:compile-options hash-compile-options)
    76 (setup-shared-extension-module 'TWUserMixHash (extension-version "1.1.3")
     76(setup-shared-extension-module 'TWUserMixHash (extension-version "1.2.0")
    7777  #:compile-options hash-compile-options)
    7878
    79 (setup-shared-extension-module 'rabin-karp (extension-version "1.1.3")
     79(setup-shared-extension-module 'rabin-karp (extension-version "1.2.0")
    8080  #:types #t
    8181  #:inline #t
     
    8686    -no-procedure-checks -no-bound-checks))
    8787
    88 (install-extension-tag 'hashes (extension-version "1.1.3"))
     88(install-extension-tag 'hashes (extension-version "1.2.0"))
Note: See TracChangeset for help on using the changeset viewer.