• Wincent
    Menu
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Add ary_clear method and use it (wikitext, 9b411a0)

Created 2/6/2008, updated 3/5/2024
  • snippets

A bit of a micro-optimization: add an ary_clear method equivalent to the Array#clear method. Although the speed-up should be intangible it does make the resulting code look a little bit neater.

Signed-off-by: Greg Hurrell <greg@hurrell.net>

← Update Token "types" method (wikitext, 853c4a3)
Use ALLOC_N instead of malloc (wikitext, ebe7aea) →

All snippets

Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell with Rust (with help from Git and Neovim).