Second Life logo
Second Life
Create
Log in
Roadmap
Feedback
šŸ“ƒ SLua Alpha
30
Log in to your Second Life account to giveĀ feedback

    Boards

  • ✨ Feature Requests

  • 🪰 Viewer Bug Reports

  • Web/Marketplace Features

  • Web/Marketplace Bugs

  • Scripting Features

  • Scripting Bugs

  • Land & Public Works

  • Server Bugs

  • Scripted Agents

  • Character Designer

  • Browser-based Viewer

  • šŸ† SLua Showcase

  • šŸ“ƒ SLua Alpha

  • SLua Announcements

PoweredĀ byĀ Canny

šŸ“ƒ SLua Alpha

General discussion and feedback on Second Life's SLua Alpha
table.extend() to add two or more array tables without requiring extra temporary memory.
A way to add two or more array tables without requiring extra temporary memory. table.extend(t1, t2) Appends all elements of array t2 to the end of array t1 The array t2 is cleared and its memory released. Elements are moved directly to avoid intermediate duplication. Working like this, but without using extra memory during the process: extend(t1, t2) table.move(t2, 1, #t2, #t1 + 1, t1) table.clear(t2) -- but without preserving the allocated space return t1 end or better: table.extend(t1, ...) Appends the elements of each additional array to the end of array t1, in the order provided. The source arrays are cleared and their memory released. Elements are moved directly to avoid intermediate duplication.
5
Ā·
Feature
Ā·
needsĀ info
PoweredĀ byĀ Canny